Report Bug

Qus: <p>What will be the output of the following Python code?</p> <pre><font color="#333333">a={1:5,2:3,3:4}<br></font><font color="#333333">a.pop(3)&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:5,2:3,3:4}<br></font><font color="#333333">a.pop(3)&nbsp;<br></font><font color="#333333">print(a)</font></pre>


A. {1: 5}
B. {1: 5, 2: 3}
C. एरर, पॉप () मैथड के लिए सिंटैक्स एरर
D. {1: 5, 3: 4}


Solution
B. {1: 5, 2: 3}



Explanation
pop() method removes the key-value pair for the key mentioned in the pop() method.
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