Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3db5e7b

Browse files
committed
range() doesn't return a list
1 parent b2b35af commit 3db5e7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/reference/compound_stmts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ the next item assigned to it.
182182
Names in the target list are not deleted when the loop is finished, but if the
183183
sequence is empty, it will not have been assigned to at all by the loop. Hint:
184184
the built-in function :func:`range` returns an iterator of integers suitable to
185-
emulate the effect of Pascal's ``for i := a to b do``; e.g., ``range(3)``
185+
emulate the effect of Pascal's ``for i := a to b do``; e.g., ``list(range(3))``
186186
returns the list ``[0, 1, 2]``.
187187

188188
.. note::

0 commit comments

Comments
 (0)