Put in order · Python course · Module 4: Data, APIs and Databases
Writing JSON to a File
Arrange the steps for writing JSON:
Items to put in order
- import json
- with open('animal.json', 'w') as f:
- json.dump(data, f)
- data = {'name': 'Tiger'}
You can check the correct answer by solving this task in the CodeWorlds game.