Why weren’t my dictionary values printed?
There are several reasons, but some common issues are:
- Using parentheses instead of brackets to access a dictionary key value, like this:
- Not matching the capitalization and/or spelling of the key found in the dictionary, like this:
- Trying to write both at once, like this:
residents["Sloth", "Burmese Python"]