← Quiz: Python Dictionaries: all 15 questions
Quiz: Python Dictionaries · Question 9 of 15
What does this print? (code)
What does this print?
d = {"a": 1, "b": 2}
print("b" in d, 2 in d)
- A.True False
- B.True True
- C.False True
- D.False False
Answer & explanation
Correct answer: True False
in checks keys, not values.
Can you get the rest right without peeking?
Take the timed Quiz: Python Dictionaries quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →