Computer Science, asked by boredperson, 3 months ago

list1 = [7,8,9]
If I want to remove the element 9 from the list, which is correct ?Immersive Reader
(1 Point)
a)list1.remove(3)
b)list1.remove( )
c)list1.remove(9)
d)None of the above

Answers

Answered by Oreki
2

Answer

   c) list1.remove(9)

Explanation

  • a) list1.remove(3), Incorrect, as remove( ) takes the element to be removed as the argument.
  • b) list1.remove( ), Incorrect, as remove( ) at least takes one argument.

List

A list is a similar to an array that consists a group of elements or items. Just like an array a list can store elements. But, there is one major difference between an array and a list.

An array can only store one type of elements whereas a list can store different types of elements.  

Similar questions