+ 1
Can someone explain this output?
x = [i for i in range(11) if i%==0] n=0 for j in x: n+=j print(n) I do not understand how the answer is 30 for range 11 should be all from 0 to 10 and i modulus==0
3 Answers
0
but why do we ise 2,4,6,8,10?
x = [i for i in range(11) if i%==0] n=0 for j in x: n+=j print(n) I do not understand how the answer is 30 for range 11 should be all from 0 to 10 and i modulus==0