Computer Science, asked by arifshaikhas1900, 11 months ago

Give an example to remove list element.

Answers

Answered by shivimishra3843
2

Answer:

Python Programming Certification is one of the most sought after certifications in the market. The reason for this is the array of functionalities Python offers. Lists are one collection that simplifies the life of programmers to a great extent.

Python List remove()

The remove() method removes the first matching element (which is passed as an argument) from the list.

Answered by Anonymous
0

An example in Python language to remove list element is:

fruits = ['apple', 'guava', 'banana', 'grapes']

fruits.remove('banana')

print ( fruits )

  • This code give the output as shown below-

        [ 'apple' , 'guava' , 'grapes' ]

  • The remove ( ) is a list method.
  • The remove ( ) method is used to remove the element from the list that has been passed as an argument.

Similar questions