1. Home
  2. MCQs by exam
  3. Python Interview Lists

Python Interview Lists MCQs

28 multiple choice questions typical of the Python Interview Lists exam, with answers and explanations. Switch on practice mode to test yourself first.

Showing 1–25 of 28

What is the output of print([x for x in [1, 2, 3] if x > 1]) in Python?

print([x for x in [1, 2, 3] if x > 1])
  1. [2, 3] Correct answer
  2. [1, 2]
  3. [1, 3]
  4. Error
MCQSEXAM Read explanation