append on list python is order of operation code example
Example 1: append a list to another list as element
a = ['Jon', 'janni', 'Jannardhan']
b = ['28', '29', '30']
a.append(b)
print(a)
a.pop()
a.extend(b)
print(a)
Example 2: how to extend an array python
my_list = ['geeks', 'for']
another_list = [6, 0, 4, 1]
my_list.extend(another_list)