Articles → Python → Insert And Remove Function In List In Python
Insert And Remove Function In List In Python
Index In List
Click to Enlarge
Insert Function
list1 = ["Apple", "Banana"]
list1.insert(0,"Orange")
print(list1)
Click to Enlarge
Remove Function
list1 = ["Apple", "Banana"]
list1.remove("Apple")
print(list1)
Click to Enlarge