Feb-11-2020, 09:01 PM
sump=0 for num in listp: if num%2==0: sump=sump+num print(sump
sump=0 for num in listp: if num%2==0: sump=sump+num print(sump)
sump=0 for num in listp: if num%2==0: sump=sump+num print(sump)Here are technically the same code, but as I play around with the indentation of print(sump) Im having differente results.
Could someone explain to me why is it about the indentation of print that makes the result different every time?