
Python question of the day
What would be the output of executing the following code: sum = 0
for i in range(5, 0, 2): sum += i > sum
print(sum)123IndexErrorExplanation:range(5, 0, 2) will result in [5, 3, 1] and for 5 sum += i > sum will make sum 1 and for 3 sum += i > sum will make sum 2