Articles → Python → Insert And Remove Function In The List In Python
Insert And Remove Function In The List In Python
Index In List
Insert Function
list1 = ["Apple", "Banana"]
list1.insert(0,"Orange")
print(list1)
Output
Remove Function
list1 = ["Apple", "Banana"]
list1.remove("Apple")
print(list1)
Output
Posted By - | Karan Gupta |
|
Posted On - | Tuesday, May 7, 2019 |