insert list example
Example 1: add element to list python at index
thislist = ["apple", "banana", "cherry"]
thislist.insert(1, "orange")
Example 2: how to add elememt in pytohn
ls=[]
ls.append('Apple')
ls.append('Mango')
for i in ls:
print(i)
thislist = ["apple", "banana", "cherry"]
thislist.insert(1, "orange")
ls=[]
ls.append('Apple')
ls.append('Mango')
for i in ls:
print(i)