python list of tuples to dict code example Example: python dict from list of tuples >>> my_list = [('a', 1), ('b', 2)] >>> dict(my_list) {'a': 1, 'b': 2}