摘要: import re,time # 1.先循环括号 # 2.算括号的乘除,后算加减 s ='1 - 2 * ( (60-30 +(-40/5) * (9-2*5/3 + 7 /3*99/4*2998 +10 * 568/14 )) - (-4*3)/ (16-3*2) )' def reduce_sysbol(name): #"+-" 或 "-+" 换成- if r... 阅读全文
posted @ 2017-05-01 17:11 golangav 阅读(322) 评论(0) 推荐(0) 编辑