Convert list of 2-element tuples to dict. Example: [('a',1),('b',2)] => {'a':1,'b':2}
Implement this function:
def tuple_to_dict(lst: list) -> dict:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst.
Input
[('a', 1), ('b', 2)]
Output
{'a': 1, 'b': 2}