Computer Science, asked by Reya21, 1 month ago

Add an element at the beginning of the list in python.

Answers

Answered by prakashakash802
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