Skip to content

Instantly share code, notes, and snippets.

@sneeu
Created April 7, 2011 10:02
Show Gist options
  • Save sneeu/907470 to your computer and use it in GitHub Desktop.
Save sneeu/907470 to your computer and use it in GitHub Desktop.
def counter(start, increment):
while True:
yield start
start += increment
result = counter(10, 2)
for __ in xrange(0, 5):
print result.next()
@latentflip
Copy link

Who let you in? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment