Advertisement
lzedl

Untitled

Jul 2nd, 2018
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def good_gen(n):
  2.     for i in xrange(n):
  3.         yield i * 2
  4.  
  5.  
  6. def bad_gen(n):
  7.     lst = [i * 2 for i in xrange(n)]
  8.     for i in lst:
  9.         yield i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement