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


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250