[issue40620] [doc] Range tutorial shorthand could be made clearer

Terry J. Reedy report at bugs.python.org
Sat Jun 26 17:01:39 EDT 2021


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Another alternative is to make the example *be* interactive.
This would also teach the easy, standard, and often better way to see the output of an iterable.

>>> list(range(5, 10))
[5, 6, 7, 8, 9]
>>> list(range(0, 10, 3))
[0, 3, 6, 9]
>>> list(range(-10, -100, -30))
[-10, -40, -70]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40620>
_______________________________________


More information about the Python-bugs-list mailing list