Skip to content

Instantly share code, notes, and snippets.

@pszafer
Created March 26, 2020 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pszafer/e6f554d42f50d9c66ce18cf995df6990 to your computer and use it in GitHub Desktop.
Save pszafer/e6f554d42f50d9c66ce18cf995df6990 to your computer and use it in GitHub Desktop.
AdrienCarState
#!/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