def file_hex(file):
if os.path.exists(file):
hex_list = []
infile = open(file, "rb")
for i in infile.read():
hex_list.append(hex(i)[2:])
infile.close()
return ''.join(hex_list)
else:
print('文件不存在')
python计算文件的16进制
最新推荐文章于 2024-11-27 19:07:07 发布