Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 12: Mastering Python Dictionaries!
Instruction
Conditionals for Dictionary
Conditional statements can be used with dictionaries to check if certain keys, values, or dictionary items exist in the dictionary or if a value satisfies a particular condition.
Example: Examples of a Conditional Statement on a Dictionary
movies = {"The godfather": 1974, "Interstellar": 2014}
print(("Interstellar", 2014) in movies.items())
# Output: True