Examveda

What will be the output of the following Python code?
>>> a={"a":1,"b":2,"c":3}
>>> b=dict(zip(a.values(),a.keys()))
>>> b

A. {'a': 1, 'b': 2, 'c': 3}

B. An exception is thrown

C. {'a': 'b': 'c': }

D. {1: 'a', 2: 'b', 3: 'c'}

Answer: Option D


This Question Belongs to Python Program >> Dictionary In Python

Join The Discussion

Related Questions on Dictionary in Python