MCQs > IT & Programming > Python > In the Python interpreter, if the code 'L = [4, 5, 6]; Y = [L] * 2; L[1] = 0' is executed, what would be stored in Y?

Python MCQs

In the Python interpreter, if the code "L = [4, 5, 6]; Y = [L] * 2; L[1] = 0" is executed, what would be stored in Y?

Answer

Correct Answer: Y = [[4, 0, 6], [4, 0, 6]]

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