πŸ“Š Python
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]
πŸ’¬ Discuss
βœ… Correct Answer: (D) [3,4,2]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
204
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Tanmay
Publisher
πŸ“ˆ
83%
Success Rate