会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
離人譖挽
人生没有过不去的坎,只有爬不完的坑 Give me the more power , o god !! !
博客园
首页
新随笔
联系
订阅
管理
2018年10月6日
用正则表达式实现 运算 express = '1 -2* ((60-30 +(-40/5) *(9-2*5/3 +7 /3*99 /4*2998 +10 *568 /14))-(-4*3)/(16-3*2))'
摘要: #!/usr/bin/env python # coding:utf-8 import re def dealwith(express): express.replace('+-','-') express.replace('--','+') return express def col_suanshu(exp): if '/' in exp: ...
阅读全文
posted @ 2018-10-06 15:08 离人怎挽_wdj
阅读(512)
评论(0)
推荐(0)
编辑
公告