【python将txt转16进制】,情人节对对碰(python txt转bin)
0evadmin
编程语言
2
文件名:【python将txt转16进制】,情人节对对碰
【python将txt转16进制】
python将txt转16进制 直接上代码 import timeprint("begin")#读取的txt文件infile = open("xxx.txt","r");#outfile = open("xxx.hex","wb");#开始读文件a = infile.read(1);_combine = "";i=0;while a != '\n':if ' ' == a:a = infile.read(1);continue;else:_combine = _combine + a;i = i+1;if 2 == i :i = 0;#转化为16进制outfile.write(bytes.fromhex(_combine));_combine = "";a = infile.read(1);infile.close();outfile.close();print("getit")
同类推荐
-

【Python CheckiO 题解】Count Consecutive Summers,sony zx1
查看 -

【Python 训练营】N_6 求素数,智器ten3
查看 -

【Python】PaddleOCR文字识别国产之光 从安装到pycharm中测试 (保姆级图文),17p
查看 -

【Python】Python爬虫:网络数据的提取利器,lg gt540
查看 -

【Python】conda镜像配置,.condarc文件详解,channel镜像,小黑c2(conda添加镜像)
查看 -

【Python】一篇带你掌握数据容器之列表,维尚律声(python 数据容器)
查看 -

【Python】从同步到异步多核:测试桩性能优化,加速应用的开发和验证,p905i
查看 -

【Python】基础练习题_文件及数据格式化,泡泡网手机频道(python文件例题)
查看 -

【Python】实现一个简单的区块链系统,三星e338
查看