add front front of the array python code example
Example 1: how to add value in front of array pythojn
x = [3, 56, 34, 67]
x.insert(0, 45)
print(x) #[43, 3, 56, 34, 67]
Example 2: python list add first
# list.insert(before, value)
list = ["a", "b"]
list.insert(0, "c")
print(list) # ['c', 'a', 'b']