myList = ["l","r","e"]
myList.insert("x")
I know that when using insert you need two arguments ,but what is the second argument I should pass?
myList = ["l","r","e"]
myList.insert("x")
I know that when using insert you need two arguments ,but what is the second argument I should pass?
The first argument is the position to insert the element. The second argument is the element.
>>> myList = ["l", "r", "e"]
>>> myList.insert(0, "a")
['a', 'l', 'r', 'e']