0
myList = ["Steven", "Jim", "John", "Eric", "Conor"]
print("My List: ", myList)
for elem in myList:
    myList.remove(elem)
print("My List: ", myList)

I want to delete each element of the list. I'm going through the each element of the list and remove it, but there's two left: Jim and Eric.

I've totally no clue why aren't they being deleted.

What's my problem? And how can I delete them?

Coder4Fun
  • 135
  • 1
  • 14

0 Answers0