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

Skip to content

Commit bf086a1

Browse files
committed
range() returns an iterable, not an iterator.
1 parent 9cb1e27 commit bf086a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/functions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,11 +874,11 @@ are always available. They are listed here in alphabetical order.
874874
.. XXX does accept objects with __index__ too
875875
.. function:: range([start,] stop[, step])
876876

877-
This is a versatile function to create iterators yielding arithmetic
877+
This is a versatile function to create iterables yielding arithmetic
878878
progressions. It is most often used in :keyword:`for` loops. The arguments
879879
must be integers. If the *step* argument is omitted, it defaults to ``1``.
880880
If the *start* argument is omitted, it defaults to ``0``. The full form
881-
returns an iterator of integers ``[start, start + step, start + 2 * step,
881+
returns an iterable of integers ``[start, start + step, start + 2 * step,
882882
...]``. If *step* is positive, the last element is the largest ``start + i *
883883
step`` less than *stop*; if *step* is negative, the last element is the
884884
smallest ``start + i * step`` greater than *stop*. *step* must not be zero

0 commit comments

Comments
 (0)