摘要: def is_op(c): return c in "+-*/" def get_pri(c): assert is_op(c) p = { "+":1, "-":1, "/":2, "*":2, } return p[c] string = "1+(2*3)/2+3" # 中缀表达式转后缀表达式 阅读全文
posted @ 2021-07-23 21:08 aminor 阅读(377) 评论(0) 推荐(0)
/**/ /**/