07 2017 档案

notepad正则替换实例
摘要: 阅读全文

posted @ 2017-07-20 15:32 sunshine_zhf 阅读(111) 评论(0) 推荐(0)

python json文件写入
摘要:with open('data.txt','w') as json_file: json.dump(a_dict,json_file,ensure_ascii = False) 或者 json_file.write(json.dumps(a_dict,ensure_ascii = False)) d 阅读全文

posted @ 2017-07-20 11:25 sunshine_zhf 阅读(8020) 评论(0) 推荐(0)

python json.dumps json.loads
摘要:import json json.dumps:将 Python 对象编码成 JSON 字符串 json.loads:将已编码的 JSON 字符串解码为 Python 对象 json.dump:把json写入文件 # 把字典写入文件 with open('data.txt','w') as json_ 阅读全文

posted @ 2017-07-19 15:01 sunshine_zhf 阅读(223) 评论(0) 推荐(0)

Python 集合set()添加删除、交集、并集、集合操作详解
摘要:在Python set是基本数据类型的一种集合类型,它有可变集合(set())和不可变集合(frozenset)两种。创建集合set、集合set添加、集合删除、交集、并集、差集的操作都是非常实用的方法。 创建集合set python set类是在python的sets模块中,大家现在使用的pytho 阅读全文

posted @ 2017-07-17 10:26 sunshine_zhf 阅读(447) 评论(0) 推荐(0)

导航