Exercise 9: Dictionary

Python supports a data structure known as dictionary:  a set which contains key, value pairs. For every key in a dictionary,  there is a value. Unlike lists, dictionaries do not have an specific order.

Type the code below and run it:

Related: Complete Python Bootcamp: Go from zero to hero in Python

Previous
Next

One thought on “Exercise 9: Dictionary”

  • I ran into an error with the code listed here. It flags me that I’m missing parenthesis in call to print. I fixed this by adding parenthesis such as print(words[“BMP”]). I don’t know if this is a typo or some other error, but it works with my solution.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">