From 27e35ad2f177f5594ac52bbad0c1118af74e03bb Mon Sep 17 00:00:00 2001 From: TiagoRG <35657250+TiagoRG@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:34:06 +0000 Subject: [PATCH] Small simplification --- 1ano/1semestre/fp/aula05/ex08.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/1ano/1semestre/fp/aula05/ex08.py b/1ano/1semestre/fp/aula05/ex08.py index 472d49b..ac0cb0e 100755 --- a/1ano/1semestre/fp/aula05/ex08.py +++ b/1ano/1semestre/fp/aula05/ex08.py @@ -27,8 +27,7 @@ def removeAdjacentDuplicates(s): def reapeatNumTimes(n): lst = [] for i in range(1, n+1): - for j in range(i): - lst.append(i) + lst += [i] * i return lst