py list append right code example
Example 1: add a value to the start of a list python
>>>var=7
>>>array = [1,2,3,4,5,6]
>>>array.insert(0,var)
>>>array
[7, 1, 2, 3, 4, 5, 6]
Example 2: python push to list
append(): append the object to the end of the list.
insert(): inserts the object before the given index.
extend(): extends the list by appending elements from the iterable.