vals = [1, 2, 3]
operators = ['+', '*', '-', '/']

def expressions(values):
    if len(values) == 1:
        yield values
for i in range(len(values)):
    forward = values[:]
val = forward.pop(i)
for op in operators:
    for rest in expressions(forward):
        yield [val, op] + rest
for expr in expressions(vals):
    expr = ' '.join(str(x) for x in expr)
print('{} = {}'.format(expr, eval(expr)))
пробуя все комбинации операций над списком переменных