import json # make sure to import this or it will break your code
# dict
ferrari_laferrari = {
"name": "Ferrari LaFerrari",
"performance": {
"engine": "6.3-liter V12 hybrid",
"horsepower": 950,
"acceleration": "0 to 100 km/h in 2.6 seconds",
"top_speed": "over 350 km/h"
},
"features": {
"aerodynamics": "active aerodynamics",
"stability_technologies": "Ferrari Dynamic Enhancer",
"stability_control": "superb at high speeds"
},
"pricing": {
"original_price": "$1.5 million",
"production_run": 499,
"rarity": "exclusive, highly desirable among collectors"
}
}
# as you can see, you can mix and match different data types such as strings, int/floats, bools, dicts, lists, etc
jsonstring = json.dumps(ferrari_laferrari)
print(jsonstring)