题解 | #四则运算#人生苦短,我用python yyds
四则运算
http://www.nowcoder.com/practice/9999764a61484d819056f807d2a91f1e
while True:
try:
str_input = input()
str_input = str_input.replace('{', '(')
str_input = str_input.replace('[', '(')
str_input = str_input.replace('}', ')')
str_input = str_input.replace(']', ')')
result = eval(str_input)
print(int(result))
except:
break
try:
str_input = input()
str_input = str_input.replace('{', '(')
str_input = str_input.replace('[', '(')
str_input = str_input.replace('}', ')')
str_input = str_input.replace(']', ')')
result = eval(str_input)
print(int(result))
except:
break