Usual method of applying mathematics to variables is
a * b
Is it able to calculate and manipulate two operands like this?
You can use the operator module and a dictionary:
import operator ops = { "+": operator.add, "-": operator.sub, "*": operator.mul, "/": operator.div } op_char = input('enter a operand') op_func = ops[op_char] result = op_func(a, b)