Q. What does the Python code: x = [1, 2, 3]; print(1 in x) output?

A
True
B
False
C
1
D
Error
Solution:

The in operator checks if 1 is present in the list x, returning True since 1 is an element.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!