python dict

Converting Between Python Dictionaries and JSON

We will use json.dums() function to convert to json from python dictionary and json.loads() to convert from json to python dictionary. In this example code we used flower details data in python dictionary and converted it to json. import json # flowers in python dictionary flowers = { “rose”: { “scientific_name”: “Rosa”, “grows_in”: [“gardens”, “wild”], […]