Here is my code
for j in range(5,8):
for i in range(6):
print("[{}][{}]".format(i,j))
j-=1
This is what I am getting. The j value on the right should decrement from 5 to 4 after the first complete loop. View code for further explanation
[0][5]
[1][4]
[2][3]
[3][2]
[4][1]
[5][0]
[0][6] # Here, I want the j value or 6 to decrement to 4 but it's incrementing
[1][5]
[2][4]
[3][3]
[4][2]
[5][1]
[0][7]
[1][6]
[2][5]
[3][4]
[4][3]
[5][2]
This is what I want
[0][5]
[1][4]
[2][3]
[3][2]
[4][1]
[5][0]
[0][4] # Here, I want the j value to decrement to 4
[1][3]
[2][2]
[3][1]
[4][0]
[0][3]
[1][2]
[2][1]
[3][0]