1. Learn
  2. /
  3. Courses
  4. /
  5. Importing Data in Python

Connected

Exercise

Loading and exploring a JSON

Now that you know what a JSON is, you'll load one into your Python environment and explore it yourself. Herein, you'll load the JSON 'a_movie.json' into the variable json_data, which will be a dictionary. You'll then explore the JSON contents by printing the key-value pairs of json_data to the shell.

Instructions

100 XP
  • Load the JSON 'a_movie.json' into the variable json_data within the context provided by the with statement.
  • Use a for loop to print all key-value pairs in the dictionary json_data.