Online Python Compiler

# expression to be evaluated user_expr = raw_input("Enter an expression in terms of variable a):") #nter the value of variable a = int(raw_input("Enter the value of a:")) # evaluate the expression result = eval(user_expr) # printing evaluated result print("Result = {}".format(result))