Created
June 11, 2018 21:50
-
-
Save ettorerizza/df1a35df23942e322dd827fa46b48f08 to your computer and use it in GitHub Desktop.
Write json keys in a text file
This file contains hidden or 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 | |
| from pprint import pprint | |
| with open(r'C:\Users\ettor\Desktop\lod-data.json') as f: | |
| data = json.load(f) | |
| myfile = open('test.txt', 'a') | |
| for key in data.keys(): | |
| myfile.writelines(key+'\n') | |
| myfile.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment