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

Accessing Dictionary Items

In Python, values associated with keys in a dictionary can be accessed using the keys as indexes. Here are two ways to access dictionary items in Python:

  1. Square Bracket Notation:
    • Square brackets [] with the key inside access the value associated with that key. If the key is not found, an exception will be thrown.
  2. get() Method:
    • The get() method is called w...