I got a little bit of a problem here. I'm trying to make a nested loop, but the second loop only runs one time.
Here is the code:
def solver(numbers, gleichung_list = [], temp = []):
    perm = itertools.permutations(numbers)
    permlist = [list(y) for y in perm]
    oper = itertools.product(['+', '-', '*', '/'], repeat=len(numbers)-1)
    for gleichung in permlist:
        print(gleichung)
        for ops in oper:
            print(ops)
            temp = [None] * (len(numbers)*2-1)
            temp[::2] = list(gleichung)
            temp[1::2] = list(ops)
            print(temp)
            print(ops)
    numbers = [1, 2]
    solver(numbers)
But when i run it, this is what i got:
[1, 2]
('+',)
[1, '+', 2]
('+',)
('-',)
[1, '-', 2]
('-',)
('*',)
[1, '*', 2]
('*',)
('/',)
[1, '/', 2]
('/',)
[2, 1]
Why don't the second loop run?
 
     
     
    