remove items from list in Python

 remove items from list in Python

to remove elements from the list we use remove () inbulit function in Python. remove( ) inbuilt function have one parameter object we have to just give parameter value for removing element from the list. Let’s see its syntax and an example of it.

Syntax :- list.remove( object )

Example :-

  1. x=['a','r','s'] 
  2. x.remove('r') 
  3. print(x) 

Comments

Popular posts from this blog

Programmingshark index 6

Proassignmenthelp index 12

Proassignmenthelp index 27