博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
json文件导入
阅读量:4573 次
发布时间:2019-06-08

本文共 339 字,大约阅读时间需要 1 分钟。

import json              with open('jsonfile.json') as js:

js = json.load(open('jsonfile.json'))     ss = json.load(js)
print(js)                 print(ss)


 

文件写入 import json number = [1, 2, 3, 4, 5, 6] filename = 'jsonfile.json' with open(filename, 'w')as js:     json.dump(number,js)

转载于:https://www.cnblogs.com/anglesheepbobo/p/7823581.html

你可能感兴趣的文章
前端基础进阶(三):变量对象详解
查看>>
53. Maximum Subarray
查看>>
SSIS 错误代码 DTS_E_OLEDB_EXCEL_NOT_SUPPORTED 没有可用的 OLE DB 访问接口 SSIS 的 64 位版本中不支持 Excel 连接管理器...
查看>>
Ubuntu 16.09下iptables通过raw表实现日志输出和调试
查看>>
切割器
查看>>
[算法]Collebarative Filtering
查看>>
树链剖分详解
查看>>
http://www.imooc.com/video/4767 zepto教学视频笔记
查看>>
clientX,screenX,pageX,offsetX的异同
查看>>
c# in out ref关键字
查看>>
字符串的基本操作
查看>>
day 30 客户端获取cmd 命令的步骤
查看>>
(tips,javascript,office)客户端操作excel文档的注意事项
查看>>
pku 1094 Sorting It All Out ——拓扑排序
查看>>
笔记javascript
查看>>
uva 10608 Friends 并查集
查看>>
Java.util.Map排序输出
查看>>
iOS 字体下载
查看>>
Distinct
查看>>
INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net解决办法
查看>>