python有一个内置函数eval(),可以将字符串进行运行. 通过help(eval)查看帮助文档 Help on built-in function eval in module builtins: eval(source, globals=None, locals=None, /) Evaluate the given source in the context of globals and locals. The source may be a string representing a…
Input是个内建函数: >>> input <built-in function input> >>> 具体用法:接收用户输入的内容,输入的字符串,接收到就是字符串:输入的是数字,接收的就是数字 >>> name = input("please input your name:") please input your name:python >>> name 'python' >>&g…
""" description : use python eval() function implement a simple calculator functions can be used as follow: ---------------------------------------- + : addition - : minus * : multiplication / : division % : --> /100.0 e : math.e pi : ma…