MCQs > IT & Programming > Python > Which will be the output of the below code snippet? def foo(x=[]): x.append(1) print(x) foo() foo() foo()

Python MCQs

Which of the following will be the output of the below code snippet? def foo(x=[]): x.append(1) print(x) foo() foo() foo()

Answer

Correct Answer: [1] [1, 1] [1, 1, 1]

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it