Articles → Python → Insert And Remove Function In The List In Python

Insert And Remove Function In The List In Python






Index In List




Picture showing the graphical representation of index in list



Insert Function




list1 = ["Apple", "Banana"]
list1.insert(0,"Orange")
print(list1)



Output


Picture showing the output of the Insert function of list in python



Remove Function




list1 = ["Apple", "Banana"]

list1.remove("Apple")
print(list1)



Output


Picture showing the output of the Remove function of list in python



Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, May 7, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250