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">b={4:"D",5:"E"}<br></font><font color="#333333">a.update(b)&nbsp;<br></font><font color="#333333">print(a)</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">b={4:"D",5:"E"}<br></font><font color="#333333">a.update(b)&nbsp;<br></font><font color="#333333">print(a)</font></pre>


A. {1: ‘A’, 2: ‘B’, 3: ‘C’}
B. मैथड अपडेट () ड़िक्शनरी के लिए मौजूद नहीं है
C. {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
D. {4: ‘D’, 5: ‘E’}


Solution
C. {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}



Explanation
update() method adds dictionary b’s key-value pairs to dictionary a. Execute in python shell to verify.
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