How can I transform tuple like this:
( ('a', 1), ('b', 2) )
to dict:
{ 'a': 1, 'b': 2 }
Dict constructor can do this for you.
dict(( ('a', 1), ('b', 2) ))
1.4m articles
1.4m replys
5 comments
57.0k users