how to add element to end of list python code example
Example 1: python add to list with index
list.insert(index, element)
Example 2: python add to start of list
>>>var=7
>>>array = [1,2,3,4,5,6]
>>>array.insert(0,var)
>>>array
[7, 1, 2, 3, 4, 5, 6]