a=10
b=20
srting='a+b'
print(eval(string))
import operator
ops = { "+": operator.add, "-": operator.sub } # etc.
print(ops["+"](1,1)) # prints 2
ops = {"+": (lambda x,y: x+y), "-": (lambda x,y: x-y)}
op = {'+': lambda x, y: x + y,
'-': lambda x, y: x - y}
print(op['+'](1,2))