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=a.copy()<br></font><font color="#333333">b[2]="D"&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=a.copy()<br></font><font color="#333333">b[2]="D"&nbsp;<br></font><font color="#333333">print(a)</font></pre>


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


Solution
B. {1: ‘A’, 2: ‘B’, 3: ‘C’}



Explanation
Changes made in the copy of the dictionary isn’t reflected in the original one.
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