Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def good_gen(n):
- for i in xrange(n):
- yield i * 2
- def bad_gen(n):
- lst = [i * 2 for i in xrange(n)]
- for i in lst:
- yield i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement