我旁边算法在Python解析表达式: def parse(strinput):
for operator in ["+-", "*/"]:
depth = 0
for p in range(len(strinput) - 1, -1, -1):
if strinput[p] == ')': depth += 1
elif strinput[p]
我的代码动态地生成字符串/数字操作。该程序动态建立类似如下的内容:我想 "My name " + "is " + "G-Man"
"Your age is " + "21"
"5" * "5"
输出这样的: My Name is G-Man
Your age is 21
25
我可以写这样的库,但目前我在时间约束下。如果有人知道可以执行与上面类似的方程式(int + int = i