Python3/list/ look near elements on list[x][y] : **Python3 *list***

    mas1 = [[True, False, True],
            [False, True, True],
            [False, True, False]]

    mas_answer = [[1, 4, 2],
                  [3, 4, 3],
                  [2, 2, 3]]

Main idea: I need to check all elements of mas1 and put the number of closest "True" elements for the current position in mas_answer.

Please Help.