OK, here is why your program is doing what it's doing:
In line 7, row is set to 1, then the for loop at line 9 loops 5 times, and when it does, row does not change, does it?
After the for loop at line 9 loops 5 times then the for loop at line 7 increments row to the value of 2, and then the for loop at line 9 executes again 5 times in which row remains the same during the 5 loops with only column changing.
In line 10, you are printing out column and then row right after that, and then repeating that 5 times. So row always comes after column, so then row must always be 1 larger than column, right?? What would cause that? All you need to do is print out 12345 and then go down a line and do it again. That can't be that hard, is it? I think that you are over thinking this deal. : )
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: