What Will Be The Output Of The Following Python Codep Pre #591
What will be the output of the following Python code?</p> <pre><code class="language-python"> >>> a={i: i*i for i in range(6)} >>> a </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={i: i*i for i in range(6)} >>> a
Dictionary comprehension doesn’t exist
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6:36}
{0: 0, 1: 1, 4: 4, 9: 9, 16: 16, 25: 25}
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}