LEVEL 5Identity & membership
PYTHON, PLOT TWIST! Q45
Membership in dictionaries
What’s the output? Think first. Trust your brain.
question_45.pyPython 3
1data = {"name": "Ali", "age": 20}2print("name" in data)3print("Ali" in data)4print(20 in data.values())5print("age" not in data)
Dictionary bouncer says…

Keys only. Values use another door.
a very python moment