A

Admin • 831.35K Points
Coach

Q. What is the output of the following code?

Code:
def foo(k):
k[0] = 1
q = [0]
foo(q)
print(q)
  • (A) [0].
  • (B) [1].
  • (C) [1, 0].
  • (D) [0, 1].
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category Python
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.