Reputation: 1
list1=[1,2,3,4,5] for i in list1: list1.remove(i) print(list1)
why the output is [2,4] why not empty list as the value of I will be list elements
Upvotes: 0
Views: 35