Run
import json myList = [{'a': 54}, {'b': 41, 'c':87}] jsonString = json.dumps(myList, indent=4) print(jsonString)
Output