1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate Python

Exercise

Dictionary Manipulation (2)

Somebody thought it would be funny to mess with your accurately generated dictionary. An adapted version of the europe dictionary is available in the script.

Can you clean up? Do not do this by adapting the definition of europe, but by adding Python commands to the script to update and remove key:value pairs.

Instructions

100 XP
  • The capital of Germany is not 'bonn'; it's 'berlin'. Update its value.
  • Australia is not in Europe, Austria is! Remove the key 'australia' from europe.
  • Print out europe to see if your cleaning work paid off.