OK so I know why the old code didn't work.
Its because at the start of the game, the first if condition is always met i.e. none of the integers are correct, then the second if condition is checked and this fails because the last integer is 0, at both the start and end of the game. Thus always returning true immediately after start up.
I adapted the code and finally made it work (and pass check50), although the new code is quite cumbersome.
It involves removing the second if condition and using a new logic: that the last integer of the 2D array need not be checked because if all the other values are in the correct space, then the last one must be 0 (or '_').
This can be done by adapting the for loops so as to ensure that the last integer is not checked.