Vidyalelo
Python · Q77

MCQs for Python Dictionaries: Exam

Programming · Python · question 77

Q77

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

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board