Does creating a new list in every loop costs time? Or can it be treated in time complexity of O(1)? my intention is to this code:
n = len(lst)
for i in range(n):
l = l + list(range(len(lst)))
Is the creation of a new list in size n costs O(n) time?