append a list to a list in python code example
Example 1: append python
it=[]
for i in range(10):
it.append(i)
Example 2: how to extend an array python
my_list = ['geeks', 'for']
another_list = [6, 0, 4, 1]
my_list.extend(another_list)
it=[]
for i in range(10):
it.append(i)
my_list = ['geeks', 'for']
another_list = [6, 0, 4, 1]
my_list.extend(another_list)