Small simplification

This commit is contained in:
TiagoRG 2023-01-30 18:34:06 +00:00
parent 3ca248e831
commit e8f8781c26
1 changed files with 1 additions and 2 deletions

View File

@ -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