🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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")
  1. A.Not available
  2. B.An error
  3. C.Delivery available
  4. 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 →