Guest User

Untitled

a guest
Jan 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def repeat(x):
  2. while True: yield x
  3.  
  4. $ python2
  5. ...
  6. >>> map(dict, [["ab"], ["cd"], ["ef"]])
  7. [{'a': 'b'}, {'c': 'd'}, {'e': 'f'}]
  8. >>> map(lambda x: dict(x), [["ab"], ["cd"], ["ef"]])
  9. [{'a': 'b'}, {'c': 'd'}, {'e': 'f'}]
Add Comment
Please, Sign In to add comment