Snatch any course you want for just $15! Go to “Courses” and find a course ↓
Questions
2. Question 1

Instruction

Let's start with reading a file!

Exercise

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:
  ...