Created
June 24, 2021 11:55
-
-
Save sht/512caade4c9fbc70a68005243d38dd9d to your computer and use it in GitHub Desktop.
to make dict or json beautiful in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
data = {Data} | |
d1 = json.dumps(data) | |
parsed = json.loads(d1) | |
print(json.dumps(parsed, indent=4, sort_keys=True)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment