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

Insert And Remove Function In List In Python






Index In List




Picture showing the graphical representation of index in list

Click to Enlarge


Insert Function




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




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

Click to Enlarge


Remove Function




list1 = ["Apple", "Banana"]

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




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

Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250