Report Bug

Qus

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()
Qus

निम्नलिखित 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
B. The program prints on row 3 4 5 1 33 6 1 2
C. The program prints two rows 3 4 5 1 followed by 33 6 1 2
D. The program prints two rows 1 3 4 5 followed by 1 2 6 33


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



Explanation
Execute in the shell to verify.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz