Adding an item to the beginning of a Python list

Question:

There is an append () function, but it adds an item to the end of the list, which function should I use to add it to the beginning? for instance

[10,100,55]
Добавить 5 в начало 
[5,10,100,55]

Answer:

l = [10,100,55]

Option 1:

l.insert(0, 5)

Option 2:

l = [5] + l
Scroll to Top