165k views
1 vote
What will you see on the next line?

>>>myList = [5, 6, 10, 6, 32]
>>> myList.remove(6)
>>> myList

User Louis LC
by
7.2k points

1 Answer

3 votes

Answer:

[5, 10, 6, 32]

Step-by-step explanation:

What myList.remove(6) will do is remove the first 6 it will encounter. It will cycle through the list like the following:

5 != 6 next element

6 = 6 remove

hope i helped :D

What will you see on the next line? >>>myList = [5, 6, 10, 6, 32] >&gt-example-1
User Kumar Chandraketu
by
6.6k points