Home
MCQs by exam
Python Interview Lists
Data Science
Python Interview Lists MCQs – Data Science · Page 2
28 multiple choice questions typical of the Python Interview Lists exam, with answers and explanations. Switch on practice mode to test yourself first.
print(sorted([2, 3, 1], reverse=True))
A
[1, 2, 3]
B
[2, 3, 1]
C
None
D
[3, 2, 1]
Correct answer
m = [[0] * 2] * 2
m[0][0] = 1
print(m)
A
[[1, 0], [0, 0]]
B
[[1, 0], [1, 0]]
Correct answer
C
[[0, 0], [0, 0]]
D
Error
print([3, 1, 2].sort())
A
[1, 2, 3]
B
[3, 2, 1]
C
Error
D
None
Correct answer
Practise on paper
Preparing for Python Interview Lists?
Make it your exam plan: see your progress in every subject and topic, set a daily goal and practise what you have not done yet.
Start my Python Interview Lists plan
Test yourself
Take a timed online test and get a certificate, or play today's quick quiz.
Online tests
Daily quiz