range(start, stop, step) counts from start in increments of step and stops before reaching stop, giving 1, 4 and 7 — the next value, 10, is excluded. The stop is never included, the third argument is a step rather than a count of items, and the sequence begins at the start argument, not at the step.
Official docs