From Java to Python
Pages
Home
Friday, May 9, 2014
python: dictionary comprehension
dict = { 'a':1, 'b':2 } dict = { k: str(dict[k]) for k in dict.keys() } print(dict)
http://stackoverflow.com/questions/14507591/python-dictionary-comprehension
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment