Question 142

What is the output? a = [1, 2, 3]

What is the output? a = [1, 2, 3] b = a b.append(4) print(a)
  1. A[1, 2, 3]
  2. B[1, 2, 3, 4]
  3. C[4]
  4. DError
Show answerHide answer

Correct answer: (B) [1, 2, 3, 4]

Explanation

b and a refer to the same list object.

From DSSSB TGT Computer Science Full Mock Test 3

This is question 142 of DSSSB TGT Computer Science Full Mock Test 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.