Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create json list of object to file python

import json

aList = [{"a":54, "b":87}, {"c":81, "d":63}, {"e":17, "f":39}]
jsonString = json.dumps(aList)
jsonFile = open("data.json", "w")
jsonFile.write(jsonString)
jsonFile.close()
Comment

PREVIOUS NEXT
Code Example
Python :: open csv from google drive using python 
Python :: pandas lambda if else 
Python :: python plot cut off when saving 
Python :: discard vs remove python 
Python :: get desktop location python 
Python :: check palindrome in python using recursion 
Python :: from csv to pandas dataframe 
Python :: UnicodeDecodeError ‘utf8’ codec can’t decode byte pandas 
Python :: python read tab delimited file 
Python :: pandas show all dataframe 
Python :: shutil.make_archive 
Python :: increase pie chart size python 
Python :: python format datetime 
Python :: how to remove the very last character of a text file in python 
Python :: lisy in python 
Python :: pandas display rows config 
Python :: gluten 
Python :: plot_histogram qiskit pycharm 
Python :: your generated code is out of date and must be regenerated with protoc = 3.19.0 tensorflow 
Python :: python join list with comma 
Python :: pandas groupby sum 
Python :: how to add a column to a pandas df 
Python :: most occurring string in column pandas 
Python :: extract topic to csv file 
Python :: save plot in python 
Python :: How to decrease length of entry in tkinter 
Python :: change pandas column value based on condition 
Python :: python convert twitter id to date 
Python :: find python path windows 
Python :: replace column values pandas 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =