Skip to content

Commit 134c998

Browse files
committed
Zip parameters were reversed
1 parent 68f5900 commit 134c998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def count_to(count):
55
"""Counts by word numbers, up to a maximum of five"""
66
numbers = ["one", "two", "three", "four", "five"]
77
# enumerate() returns a tuple containing a count (from start which defaults to 0) and the values obtained from iterating over sequence
8-
for pos, number in zip(numbers, range(count)):
8+
for pos, number in zip(range(count), numbers):
99
yield number
1010

1111
# Test the generator

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy