Q42
What will be the output of the following Python code? def increment_items(L, increment): i = 0 while i < len(L): L[i] = L[i] + increment i = i + 1 values = [1, 2, 3] print(increment_items(values, 2)) print(values)
A.
None
[3, 4, 5]
Answer[3, 4, 5]
B.
None
[1, 2, 3]
[1, 2, 3]
C.
[3, 4, 5]
[1, 2, 3]
[1, 2, 3]
D.
[3, 4, 5]
None
None
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board