NIELIT O Level Exam

<p>What will be the output of the following Python code?</p><pre>values = [[3, 4, 5, 1 ], [33, 6, 1, 2]]<br>for row in values:<br>&nbsp; &nbsp; row.sort()<br>&nbsp; &nbsp; for element in row:<br>&nbsp; &nbsp; &nbsp; &nbsp; print(element, end = " ")<br>&nbsp; &nbsp; print()</pre>

What will be the output of the following Python code?

values = [[3, 4, 5, 1 ], [33, 6, 1, 2]]
for row in values:
    row.sort()
    for element in row:
        print(element, end = " ")
    print()


निम्नलिखित Python कोड का आउटपुट क्या होगा?

values = [[3, 4, 5, 1 ], [33, 6, 1, 2]]
for row in values:
    row.sort()
    for element in row:
        print(element, end = " ")
    print()

A. The program prints two rows 3 4 5 1 followed by 33 6 1 2 प्रोग्राम दो रो 3 4 5 1 को प्रिंट करता है और उसके बाद 33 6 1 2

B. The program prints on row 3 4 5 1 33 6 1 2 प्रोग्राम रो 3 4 5 1 33 6 1 2 पर प्रिंट करता है

C. The program prints two rows 3 4 5 1 followed by 33 6 1 2 प्रोग्राम दो रो 3 4 5 1 को प्रिंट करता है और उसके बाद 33 6 1 2

D. The program prints two rows 1 3 4 5 followed by 1 2 6 33 प्रोग्राम दो रो 1 3 4 5 प्रिंट करता है और उसके बाद 1 2 6 33




Correct Answer is :

D. The program prints two rows 1 3 4 5 followed by 1 2 6 33



Explanation
Execute in the shell to verify.
Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad