Small simplification
This commit is contained in:
parent
3ca248e831
commit
e8f8781c26
|
@ -27,8 +27,7 @@ def removeAdjacentDuplicates(s):
|
||||||
def reapeatNumTimes(n):
|
def reapeatNumTimes(n):
|
||||||
lst = []
|
lst = []
|
||||||
for i in range(1, n+1):
|
for i in range(1, n+1):
|
||||||
for j in range(i):
|
lst += [i] * i
|
||||||
lst.append(i)
|
|
||||||
return lst
|
return lst
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue