Answers for "python append in the beginning"

41

python append to start of list

lst = ["f", "o", "o", "b", "a","r"]
lst.insert(0,"b")
print(lst) # ["b", "f", "o", "o", "b", "a", "r"]
Posted by: Guest on December-09-2021

Code answers related to "python append in the beginning"

Python Answers by Framework

Browse Popular Code Answers by Language