Skip to content

Instantly share code, notes, and snippets.

View AdamMujtaba's full-sized avatar

Adam Mujtaba AdamMujtaba

  • Iraq, Baghdad
View GitHub Profile
@AdamMujtaba
AdamMujtaba / save-file.py
Created January 26, 2018 16:17 — 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 = {}