MCQs > IT & Programming > Python > Output of the following script? def f(a, L=[]): L.append(a) return L print(f(1)) print(f(2)) print(f(3))

Python MCQs

What is the output of the following script? def f(a, L=[]): L.append(a) return L print(f(1)) print(f(2)) print(f(3))

Answer

Correct Answer: [1] [1, 2] [1, 2, 3]

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

More Python MCQ Questions

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it