Report Bug

Qus: <p>What will be the output of the following Python code?</p> <pre><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">for i in a:&nbsp;<br></font><font color="#333333">&nbsp; &nbsp; print(i,end=" ")</font></pre>

Qus<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">for i in a:&nbsp;<br></font><font color="#333333">&nbsp; &nbsp; print(i,end=" ")</font></pre>


A. 1 2 3
B. ‘A’ ‘B’ ‘C’
C. 1 ‘A’ 2 ‘B’ 3 ‘C’
D. एरर , यह होनी चाहिए: i in a.items () में:


Solution
A. 1 2 3



Explanation
The variable i iterates over the keys of the dictionary and hence the keys are printed.
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test , CCC MCQ Python Coding Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Website development Company in Allahabad