append elements of list inside loop of a list python code example
Example: loop append to list python
a=[]
for i in range(5):
a.append(i)
print(a)
# [0, 1, 2, 3, 4]
a=[]
for i in range(5):
a.append(i)
print(a)
# [0, 1, 2, 3, 4]