Series of posts (2)
If you want to build up a dict using two lists, zip() can be used as this:
dict(zip(list_a, list_b))
Sometimes, OrderedDict and DefaultDict in module collections can be useful. When you need a dict whose keys are
If you want to build up a dict using two lists, zip() can be used as this:
dict(zip(list_a, list_b))
Sometimes, OrderedDict and DefaultDict in module collections can be useful. When you need a dict whose keys are