complexity of append python code example
Example 1: python add all values of another list
a = [1, 2, 3]
b = [4, 5, 6]
a += b
# another way: a.extend(b)
Example 2: how to extend an array python
my_list = ['geeks', 'for']
another_list = [6, 0, 4, 1]
my_list.extend(another_list)