| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68f5900 commit 134c998
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ def count_to(count): | |||
| 5 | 5 | """Counts by word numbers, up to a maximum of five""" | |
| 6 | 6 | numbers = ["one", "two", "three", "four", "five"] | |
| 7 | 7 | # 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): | ||
| 9 | 9 | yield number | |
| 10 | 10 | ||
| 11 | 11 | # Test the generator | |
| Back | FazBrowse Home | New Git URL |
0 commit comments