Knowledge Map

python2으로 json 파일 생성하기 본문

PYTHON

python2으로 json 파일 생성하기

2018. 6. 18. 08:24

아래와 같이 사용하면 그냥 json파일을 만들수 있다.



import json
 
json_data = {"one":1"two":2"three":3}
 
with open('someData.json''w') as one_file:
    json.dump(json_data, one_file)
 
cs


'PYTHON' 카테고리의 다른 글

python2 multiprocessing 과 tensorflow  (0) 2018.06.18
celery 관련  (0) 2018.06.11
import _macosx 에서의 runtimeError  (0) 2018.06.01
create_db using sqlalchemy  (0) 2018.05.09
SQLAlchemy session transaction delete 문제  (0) 2018.04.12
Comments