Skip to content

Instantly share code, notes, and snippets.

View sanvishal's full-sized avatar
☯️
fuk around and find out

Vishal TK sanvishal

☯️
fuk around and find out
View GitHub Profile
@sanvishal
sanvishal / save-file.py
Created June 22, 2018 09:55 — forked from keithweaver/save-file.py
Save JSON file with Python
import json
def writeToJSONFile(path, fileName, data):
filePathNameWExt = './' + path + '/' + fileName + '.json'
with open(filePathNameWExt, 'w') as fp:
json.dump(data, fp)
# Example
data = {}