
python
huangyunbin90
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python的字典装为json
[code="java"] import json dic = { 'str': 'this is a string', 'list': [1, 2, 'a', 'b'], 'sub_dic': { 'sub_str': 'this is sub str', ...2013-09-09 09:31:20 · 86 阅读 · 0 评论 -
python解析json文件
[code="java"] import json f = file("2.json"); s = json.load(f) print s['end'] print s['sub_dic']['sub_str'] f.close [/code] 2.json的文件内容 [code="java"] {"sub_dic": {"sub_str": "this is sub s.2013-09-09 10:02:25 · 92 阅读 · 0 评论