MCQs > IT & Programming > Python > What gets printed on the console for the following Python 2.x code? A0 = dict(zip(('a','b','c','d','e'),(1,2,3,4,5))) A1 = range(5) A2 = sorted([i for i in A1 if i in A0]) A3 = sorted([A0[s] for s in A0]) A4 = [i for i in A1 if i in A3] A5 = {i:i*i for i in A1} A6 = [[i,i*i] for i in A1] print A6

Python MCQs

What gets printed on the console for the following Python 2.x code? A0 = dict(zip(('a','b','c','d','e'),(1,2,3,4,5))) A1 = range(5) A2 = sorted([i for i in A1 if i in A0]) A3 = sorted([A0[s] for s in A0]) A4 = [i for i in A1 if i in A3] A5 = {i:i*i for i in A1} A6 = [[i,i*i] for i in A1] print A6

Answer

Correct Answer: [[0, 0], [1, 1], [2, 4], [3, 9], [4, 16]]

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