[Python] Pretty Print Variable (Dictionary, List, Object, Array)
The easiest way is through json module included in Python:
print(json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': ')))
where obj is your variable, could be dictionary (equivalent to object in JavaScript) or list (equivalent to array in JavaScript).