Created
April 7, 2011 10:02
-
-
Save sneeu/907470 to your computer and use it in GitHub Desktop.
Python example of https://gist.github.com/907448
This file contains hidden or 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 counter(start, increment): | |
while True: | |
yield start | |
start += increment | |
result = counter(10, 2) | |
for __ in xrange(0, 5): | |
print result.next() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Who let you in? ;)