← Quiz: Python Conditions: all 13 questions
Quiz: Python Conditions · Question 10 of 13
What does this print? (code)
What does this print?
city = "Pune"
if city in ["Delhi", "Pune", "Agra"]:
print("Delivery available")
else:
print("Not available")
- A.Not available
- B.An error
- C.Delivery available
- D.Nothing
Answer & explanation
Correct answer: Delivery available
in checks whether the value is one of the items in the list.
Can you get the rest right without peeking?
Take the timed Quiz: Python Conditions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →