python多个异常解析

while True:
    try:
        expr = input()
        for i in expr:
            if i.isnumeric() or i == '.':
                pass
            else:
                x, y = expr.split(i)
                res = eval(expr)
                print(f'{eval(x):.4f}{i}{eval(y):.4f}={res:.4f}') 
    except ZeroDivisionError as e:
        print("Wrong!Division by zero!")
    except SyntaxError as e:
        print("Invalid operation!")
    finally:
        break