What Will Be The Output Of The Following Python Codep Pre #595
What will be the output of the following Python code?</p> <pre><code class="language-python"> >>> a={"a":1,"b":2,"c":3} >>> b=dict(zip(a.values(),a.keys())) >>> b </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Dictionary - Python Dictionary - Quiz No.5.
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’: 1, ‘b’: 2, ‘c’: 3}
An exception is thrown
{‘a’: ‘b’: ‘c’: }
{1: ‘a’, 2: ‘b’, 3: ‘c’}