• + 0 comments

    For me it was harder than an easy challenge but it helped me understand the comprehension list by first coding in for loop:

    result = []
    for a in range(0, x+1):
        for b in range(0, y+1):
            for c in range(0, z+1):
                if a + b + c != n:
                    result.append([a, b, c])