Skip to content

Instantly share code, notes, and snippets.

@k0001
Created February 25, 2009 02:00
Show Gist options
  • Save k0001/69944 to your computer and use it in GitHub Desktop.
Save k0001/69944 to your computer and use it in GitHub Desktop.
import time
def caca(n):
for i in xrange(n):
time.sleep(.2)
yield i
print "con generadores"
for i in caca(10):
print i
print "con lista"
for i in list(caca(10)):
print i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment