What does the following line of code produce? a(b) = b + [5] = a(b) [1, 2, 3, 4] is the value of the variable c. a(\sprint(len(c))
A. 4
B. 5
C. 1
D. There is an exception thrown
Answer:B
What does the following line of code produce? a(b) = b + [5] = a(b) [1, 2, 3, 4] is the value of the variable c. a(\sprint(len(c))
A. 4 B. 5 C. 1 D. There is an exception thrown
Explanation: Because a list is mutable, any changes made to it within the function will be mirrored outside of it.