How can I transform tuple like this:
(
('a', 1),
('b', 2)
)
to dict:
{
'a': 1,
'b': 2
}
Dict constructor can do this for you.
dict((
('a', 1),
('b', 2)
))
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