题解 | #四则运算#
四则运算
http://www.nowcoder.com/practice/9999764a61484d819056f807d2a91f1e
a = input().strip() b = {'[':'(',']':')','{':'(','}':')'} # 创建栈 stack = [] for i in a : if i not in b.keys(): stack.append(i) else : stack.append(b[i]) print(int(eval(''.join( j for j in stack))))