Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def repeat(x):
- while True: yield x
- $ python2
- ...
- >>> map(dict, [["ab"], ["cd"], ["ef"]])
- [{'a': 'b'}, {'c': 'd'}, {'e': 'f'}]
- >>> map(lambda x: dict(x), [["ab"], ["cd"], ["ef"]])
- [{'a': 'b'}, {'c': 'd'}, {'e': 'f'}]
Add Comment
Please, Sign In to add comment