Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list add first

# list.insert(before, value)
list = ["a", "b"]
list.insert(0, "c")
print(list)     # ['c', 'a', 'b']
 
PREVIOUS NEXT
Tagged: #python #list #add
ADD COMMENT
Topic
Name
3+7 =