names_friends=["Juan","Efren","Kiki", "Esmoris", "Diego", "Nando"]
for i in names_friends:
print(i)
names_friends.remove(i)
print(names_friends)
After run this code I got this.
Juan
Kiki
Diego
['Efren', 'Esmoris', 'Nando']
I would highly appreciate if someone could explain to me why it doesn't remove all the items of the list.Thanks