def get_row_len(row, col, cell_index):
if (cell_index / row) - col == float:
return -1
def get_row_len(row, col, cell_index):
a = (cell_index / row) - col
if int(a) != a:
return -1
def get_row_len(row, col, cell_index):
if type((cell_index / row) - col)) == float:
return -1
//////////
isinstance(1.1, float)
>>> True