What is the output?
print(list(range(10, 0, -3)))
- [10, 7, 4, 1]
- [10, 7, 4]
- [9, 6, 3]
- [10, 7, 4, 1, -2]
The start is included and the stop never is; stepping by -3 from 10 reaches 1 and stops before 0.
Play Problem Solving ▸
print(list(range(10, 0, -3)))