Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Dumb solution in Clear category for Find Sequence by obone
def checkio(matrix):
h = [len(set([matrix[y][x], matrix[y][x+1], matrix[y][x+2], matrix[y][x+3]]))
for x in range(len(matrix[0]) - 3) for y in range(len(matrix[0]))]
v = [len(set([matrix[y][x], matrix[y+1][x], matrix[y+2][x], matrix[y+3][x]]))
for x in range(len(matrix[0])) for y in range(len(matrix[0]) - 3)]
a = [len(set([matrix[y][x], matrix[y+1][x+1], matrix[y+2][x+2], matrix[y+3][x+3]]))
for x in range(len(matrix[0]) - 3) for y in range(len(matrix[0]) - 3)]
b = [len(set([matrix[y+3][x], matrix[y+2][x+1], matrix[y+1][x+2], matrix[y][x+3]]))
for x in range(len(matrix[0]) - 3) for y in range(len(matrix[0]) - 3)]
return 0 < (h + v + a + b).count(1)
June 25, 2019