Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
2. Question 1


Let's start with reading a file!


Read the file named cars.json and print the information about car types ("car" field) produced after 2000.

Note: Each car object in the cars.json file has four fields: id, car, year, and price. Use the car field.

Stuck? Here's a hint!

The object you have after reading the file is a list. Remember to loop over its values.

import json
with open('cars.json', 'r') as f:
  cars = json.load(f)

for x in cars: