A

Admin • 831.35K Points
Coach

Q. What will be the output of the following Python code?

Code:
def f1(a,b=[]):
b.append(a)
return b

print(f1(2,[3,4]))
  • (A) [3,2,4]
  • (B) [2,3,4]
  • (C) Error
  • (D) [3,4,2]
  • Correct Answer - Option(D)
  • Views: 21
  • 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.