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?