I know about few of the questions answered here on SO about dict(list)
i.e.
l = [['a',1] ['b',2]]
and do dict(l)
then we get:
{'a': 1, 'b': 2}
But how to make a list with 2 elements
l = ['a',1]
become a dictionary such as:
{'a':1}
using the dict
function?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With