Save data to json file in python.
import json
data = [1, 2, 3];
with open('data.json', 'w') as f:
json.dump(data, f)
Cheatsheet collection for go, rust, python, shell and javascript.
Save data to json file in python.
import json
data = [1, 2, 3];
with open('data.json', 'w') as f:
json.dump(data, f)