CBSE Class 12 Computer Science
Question 36 of 120
Review of Python Basics — Question 10
Back to all questions0
1
2
Reason — The code initializes a dictionary d with keys 0, 1, and 2, each mapped to the values 'a', 'b', and 'c' respectively. In Python, when we use a for loop with a dictionary using the in operator, like for i in d:, it iterates over the keys of the dictionary by default. During each iteration, the loop prints the current key i. Therefore, the output will be the keys of the dictionary d, which are 0, 1, and 2.