Created
February 3, 2015 06:00
-
-
Save aminami1127/e0e29b94ead611fd65f3 to your computer and use it in GitHub Desktop.
itertools.count
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count(start, stop, step): | |
x = itertools.count(start, step) | |
for i in x: | |
if i > stop: | |
break | |
yield i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment