Created
March 26, 2020 10:03
-
-
Save pszafer/e6f554d42f50d9c66ce18cf995df6990 to your computer and use it in GitHub Desktop.
AdrienCarState
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
#!/bin/python3 | |
import json | |
out={} | |
filename='testfile' | |
with open(f'{filename}.txt') as fin: | |
for line in fin: | |
x = line.rstrip().split("=") | |
out[x[0]] = x[1] | |
with open(f'{filename}.json', 'w') as fp: | |
json.dump(out,fp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment