An interesting formulation! If you were using a test boolean variable, the more "pythonic" way to do this would probably be to say "if not ack(val[0], val[1]) == val[2]: test = False" then run your if test. That way you're saving yourself the "and" operation each time through the loop.

Another point to make is for testing like this, it's generally better to use the assert function as discussed in class.
assert ack(val[0], val[1]) == val[2]

That way it will automatically raise an AssertionError if something is wrong, and you don't need a test boolean variable or an if statement before your print statement.