def _check_pair(minterm1, minterm2):
 index = (-1)
 for (x, (i, j)) in enumerate(zip(minterm1, minterm2)):
  if (i != j):
   if (index == (-1)):
    index = x
   else:
    return (-1)
 return index

def _check_pair ( minterm1 , minterm2 ) : index = ( - 1 ) for ( x , ( i , j ) ) in enumerate ( zip ( minterm1 , minterm2 ) ) : if ( i != j ) : if ( index == ( - 1 ) ) : index = x else : return ( - 1 ) return index
checks if a pair of minterms differs by only one bit .