You could use this function which is doing the same as the eval() function, but in a simple manner, using a function.
def numeric(equation):
if '+' in equation:
y = equation.split('+')
x = int(y[0])+int(y[1])
elif '-' in equation:
y = equation.split('-')
x = int(y[0])-int(y[1])
return x