Add an element at the beginning of the list in python.
Answers
Answered by
1
Answer:
insert(index, value)this inserts an item at a given position. The first argument is the index of the element before which you are going to insert your element, so array. insert(0, x) inserts at the front of the list, and array. insert(len(array), x) is equivalent to array.
Similar questions
English,
21 days ago
Chemistry,
21 days ago
Computer Science,
21 days ago
English,
9 months ago
Math,
9 months ago