test
来源:互联网 发布:java时间格式化天 编辑:程序博客网 时间:2024/06/05 02:15
# _*_ coding:utf-8 _*_import sys#sys.setdefaultingencoding('utf-8')print('************直接输出运算表达式*************')import rel=[]t=100.0p1=re.compile(r'([\d.,]+[*+-/][\d.,])(=[\d.,]+)*')f=open("test1.txt")fw=open("test2.txt","w")for line in f.readlines(): m0=p1.findall(str(line)) if m0: i=0 n=len(m0) print(m0) #print(n) while i<n: #print(m0[i]) str00=str(m0[i]).replace('*','×') str0=str00.replace('/','÷') l.append(str0) i=i+1 #print(l) #str1=''.join(str) #str2=str1.split(' ')j=0m=len(l)while j<m: fw.write(str(l[j])) fw.write('\n') j+=1 #不加这个条件就可以写病毒了 - -f.close()fw.close()
0 0
- test
- test
- test
- test
- test
- test
- test
- Test
- test
- Test
- test
- test
- test
- test
- test
- test
- test
- Test
- 【转载】CSS3 常用四个动画(旋转、放大、旋转放大、移动)
- LCS算法的C++实现
- xml解析之pull
- 获得spring源码
- 如何用PHPExcel读取超大excel文件
- test
- ubuntu下安装eclipse不显示菜单栏
- Linux安装nginx
- UITabBarController简单介绍
- py2exe使用方法
- TS科普11 PES包句法解析
- Jar mismatch! Fix your dependencies解决方法
- 数据结构之拓扑排序
- 第11周-数学方面:Complex类