我试图从一个列表中删除偶数。我的最终输出是[4, 8],但应该是空的。
list = [2, 4, 6, 8, 10]
for i in list:
divid = i %2
if divid == 0 :
list.remove(i)
print(list)