Last Updated: February 25, 2016
·
292
· lamprosmousselimis

Python - Lists to Dicts

dict_as_list = [['a', 1], ['b', 2], ['c', 3]]
dictionary = dict(dict_as_list)

# dictionary now contains {'a': 1, 'b': 2, 'c': 3}