摘要: import re def calculator(formula):#定义函数,参数为formula(传进来的公式) print(formula) #输出传进来的参数 a=''#定义一个空的变量字符串,为了将用户传进来的参数中有空格的去掉并重新给a变量公式 for i in formula:#循环传进来的参数 if i == ' ':#判断如果是空就co... 阅读全文
posted @ 2016-05-23 16:53 WuYongQi。 阅读(250) 评论(0) 推荐(0) 编辑