Answers for "python dict from list of tuples"

7

python dict from list of tuples

>>> my_list = [('a', 1), ('b', 2)]
>>> dict(my_list)
{'a': 1, 'b': 2}
Posted by: Guest on September-30-2020

Code answers related to "python dict from list of tuples"

Python Answers by Framework

Browse Popular Code Answers by Language