In 2d array get the last column and compare current value with its last iterated value and if the difference is == 1 then get row indexes of both of them . I able to do it using for loop but it gets slow when array grows as there are multiple conditions next after getting indexes

```
x=np.array ([[79, 50, 18, 55, 35], 
            [46, 71, 46, 95, 80], #1
            [97, 37, 71,  2, 79], #2
            [80, 96, 60, 85, 72],
            [ 6, 52, 63, 86, 38],
            [35, 50, 13, 93, 54], #5
            [69, 21,  4, 40, 53], #6           
            [18, 34, 91, 67, 89],
            [82, 16, 16, 24, 80]])

last_column = x[:,[-1]]
for kkk in range(1,len(last_column)):
    if last_column[kkk] == last_column[kkk-1] + 1 \ 
    or last_column[kkk] == last_column[kkk-1] - 1 :
        print('range',last_column[kkk],last_column[kkk-1])

ouput is -
[80]
[79]
range [79] [80]
[72]
[38]
[54]
[53]
range [53] [54]
[89]
[80]

```