I have
print(list_games)
array([[77, 63],
[94, 49],
[58, 98],
...,
[ 7, 0],
[68, 22],
[ 1, 32]], dtype=int64)
I need to print the first pair and their index, which satisfy the condition, but my code print all pairs. How can I fix it?
for i in range(len(list_games)):
for j in range(len(list_games)):
if list_games[i][0] + list_games[j][1] == 131:
print(list_games[i][0], list_games[j][1])
break
And I get:
77 54
94 37
58 73
51 80
80 51
74 57
66 65
61 70
87 44
40 91