소스 검색

Merge pull request #11 from betoboullosa/patch-1

Zip parameters were reversed
Sakis Kasampalis 12 년 전
부모
커밋
b6f3a82b4d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      iterator.py

+ 1 - 1
iterator.py

@@ -5,7 +5,7 @@ def count_to(count):
     """Counts by word numbers, up to a maximum of five"""
     numbers = ["one", "two", "three", "four", "five"]
     # enumerate() returns a tuple containing a count (from start which defaults to 0) and the values obtained from iterating over sequence
-    for pos, number in zip(numbers, range(count)):
+    for pos, number in zip(range(count), numbers):
         yield number
 
 # Test the generator