首页 > 编程知识 正文

始终使用该程序打开文件,使用什么软件打开文件

时间:2023-05-03 16:31:02 阅读:231049 作者:900

import osimport reimport string file = open("data2.txt")p1 = re.compile(r"^(d{16})s+(d{3})")re.compile(p1)for line in file: print(line) match1 = re.search(p1,line) #print(match1.group(0)) sCard = match1.group(1) sValue=match1.group(2) print(sCard) print(sValue) b = re.findall(r"d{2}",sCard) # remove r or one if want signle c =r'\x'.join(b) c= r'\x'+c print(c)
历史中提交的图片或压缩文件

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。