0
How can I get the sum of items in a list after removing even numbers by an iteration.Someone to helpđ Here is my code
p=[2,5,6,4 ,3,7] for i in p: if i%2==0: i.remove(i%2==o) print(sum(i)) print(sum(p))
2 RĂ©ponses
+ 1
p = [2,5,6,4,3,7]
print(sum(x for x in p if x%2))
0
I am not seeing the other questions