Report Bug

Qus: <p>What will be the output of the following Python code?</p><pre>tuple1=(5,1,7,6,2)<br>tuple1.pop(2)<br>print(tuple1)</pre><div><br></div>

Qus<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">tuple1=(5,1,7,6,2)<br>tuple1.pop(2)<br>print(tuple1)</pre>


A. (5,1,6,2)
B. (5,1,7,6)
C. (5,1,7,6,2)
D. Error


Solution
D. Error



Explanation

It will generate Attribute Error: 'tuple' object has no attribute 'pop' because tuple in immutable and it can't support pop function.

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