MCQs > IT & Programming > Python > Output of the following code be: def a(): print 'a executed' return [] def b(x=a()): x.append(5) x.append(1) print x b() b() b()

Python MCQs

What would the output of the following code be: def a(): print "a executed" return [] def b(x=a()): x.append(5) x.append(1) print x b() b() b()

 

Answer

Correct Answer: a executed [5, 1] a executed [5, 1] a executed [5, 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