Where does range stop?

Take your time, follow the code and check your understanding.

The codeLoops
total = 0
for n in range(1, 4):
    total += n
print(total)
Your answer3 min · no timer
What will the code print?

Show solution and explanation

range(1, 4) yields 1, 2 and 3. The stop value is excluded.

6