Vidyalelo
Python · Q131

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 131

Q131

What will be the output of the following Python code? def change(var, lst): var = 1 lst[0] = 44 k = 3 a = [1, 2, 3] change(k, a) print(k) print(a)

A.
3
[44, 2, 3]
Answer
B.
1
[1,2,3]
C.
3
[1,2,3]
D.
1
[44,2,3]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board