```
vals = [1, 2, 3, 4]
operators = ['+', '*', '-', '/']
result=10

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

```

![1](https://i.stack.imgur.com/O0yVZ.png)

I am stuck on this, is there any way I could print the expression which equals the result number which is being inputted by the user and not every single permutation possible.

EDIT: If u could see i have a variable called result, now with all the permuted expression, i want to print the expression which equals the result