Online Exam Quiz
Menu mobile
Home
GK Today
Subject
CCC Online Test
O Level Online Test
Coding
Report Bug
Qus: <p>What is the output of following?</p><pre>a = [1, 2, 3]<br>b = a<br>b.append(4)<br>print(a)</pre>
Qus<p>निम्न code का output क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a = [1, 2, 3]<br>b = a<br>b.append(4)<br>print(a)</pre>
A. [1, 2, 3]
B. [1, 2, 3, 4]
C. Error
D. [4]
Solution
B. [1, 2, 3, 4]
Explanation
a and b refer to the same list object, so modifying b also changes the list seen through a. <br><br> a और b एक ही list object को refer करते हैं, इसलिए b में change करने पर a में भी वही change दिखाई देता है।
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