Skip to content

Instantly share code, notes, and snippets.

@richo
Created February 27, 2014 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richo/9243374 to your computer and use it in GitHub Desktop.
Save richo/9243374 to your computer and use it in GitHub Desktop.
def gen(n):
if n != 0:
yield n
gen(n-1)
print(list(gen(10))) # What's this print?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment