MCQ Answer

<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>

What will be the output of the following Python code?

tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)



निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)
Topic : Sequence data types in python

A. (5,1,6,2)

B. (5,1,7,6)

C. (5,1,7,6,2)

D. Error




Correct Answer is :

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.

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad