return sympy.latex(sym_expr)
if __name__ == '__main__':
    print(python_to_latex(input('Enter a python math expression: '),
        simplify=True))
Methods for entering equations while programming in C/C++ , Python or Fortran