Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve wording for count()
  • Loading branch information
rhettinger committed May 27, 2024
commit 95f503b7f1510beacc20e018d11b1e429c0af07f
7 changes: 4 additions & 3 deletions Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,10 @@ loops that truncate the stream.

.. function:: count(start=0, step=1)

Make an iterator that returns evenly spaced values starting with number *start*. Often
used as an argument to :func:`map` to generate consecutive data points.
Also, used with :func:`zip` to add sequence numbers. Roughly equivalent to::
Make an iterator that returns evenly spaced values beginning with
*start*. Can be used with :func:`map` to generate consecutive data
points or with :func:`zip` to add sequence numbers. Roughly
equivalent to::

def count(start=0, step=1):
# count(10) → 10 11 12 13 14 ...
Expand Down