Answer: Python Puzzler #803

The answer is D. The program prints:

False
What the program prints
Checked by running the program for real.

Why?

in checks whether something is in the list. ‘apple’ is not in the lunchbox, so the answer is False.

The code again

lunchbox = ["banana", "carrot", "mango", "plum"]
print("apple" in lunchbox)

Try it: change one number in the program and predict the new output before you run it.