摘要: 在python3的标准库中,已经移除了md5,而关于hash加密算法都放在hashlib这个标准库中,如SHA1、SHA224、SHA256、SHA384、SHA512和MD5算法等。 以下为官方文档的介绍: https://docs.python.org/3/library/hashlib.htm 阅读全文
posted @ 2019-06-14 23:15 lanston 阅读(157335) 评论(0) 推荐(2) 编辑
摘要: dump json.dump()用于将dict类型的数据转成str,并写入到json文件中。 import json Dict = {"name":"tom"} with open("./file.json", "w") as f: json.dump(Dict, f) load json.load 阅读全文
posted @ 2019-06-14 21:38 lanston 阅读(9464) 评论(0) 推荐(1) 编辑