#算具体的哈希值
import hashlib
##网页的哈希值计算
# md5=hashlib.md5()
# md5.update('http://www.baidu.com'.encode("utf-8"))
# print(md5)
# print(md5.hexdigest())
# 数据去重 哈希过程
#文件的哈希值计算
for file in ["ddd.txt","dd.txt","d.txt"]
md5=hashlib.md5()
#优先级排序:
# md5 = hashlib.sha3_512() #不会出错,可用于加密
# md5 = hashlib.sha1() #md5小于sha1
file=open(filename,"rb")
buf=file.read()
md5.update(buf)
print(md5.hexdigest())