Estou com a lista abaixo e quero filtrar ela para que cada lista dentro da lista não tenha mais do que 3 elementos repetidos entre elas.
Ex: list[0] = [3, 4, 5, 9, 18, 23, 28] e list [1] = [3, 4, 5, 10, 17, 23, 28] possuem 5 elementos em comum [3, 4, 5, 23, 28], então queria que list contivesse somente um dos dois.
list = [[3, 4, 5, 9, 18, 23, 28],
[3, 4, 5, 10, 17, 23, 28],
[3, 4, 5, 10, 21, 23, 28],
[3, 4, 5, 13, 18, 23, 28],
[3, 4, 7, 9, 18, 21, 28],
[3, 4, 7, 10, 17, 21, 28],
[3, 4, 7, 13, 17, 18, 28],
[3, 4, 7, 13, 18, 21, 28],
[3, 4, 9, 10, 17, 23, 28],
[3, 4, 9, 10, 21, 23, 28],
[3, 4, 9, 13, 18, 23, 28],
[3, 4, 10, 13, 17, 23, 28],
[3, 4, 10, 13, 18, 21, 23],
[3, 4, 10, 13, 21, 23, 28],
[3, 5, 9, 10, 17, 18, 28],
[3, 5, 9, 10, 18, 21, 28],
[3, 5, 10, 13, 17, 18, 28],
[3, 5, 10, 13, 18, 21, 28],
[3, 9, 10, 13, 17, 18, 28],
[3, 9, 10, 13, 18, 21, 28],
[4, 5, 7, 9, 18, 23, 28],
[4, 5, 7, 10, 17, 23, 28],
[4, 5, 7, 10, 21, 23, 28],
[4, 5, 7, 13, 18, 23, 28],
[4, 7, 9, 10, 17, 23, 28],
[4, 7, 9, 10, 18, 21, 23],
[4, 7, 9, 10, 21, 23, 28],
[4, 7, 9, 13, 18, 23, 28],
[4, 7, 10, 13, 17, 18, 23],
[4, 7, 10, 13, 17, 23, 28],
[4, 7, 10, 13, 18, 21, 23],
[4, 7, 10, 13, 21, 23, 28],
[5, 7, 9, 10, 17, 18, 28],
[5, 7, 9, 10, 18, 21, 28],
[5, 7, 10, 13, 17, 18, 28],
[5, 7, 10, 13, 18, 21, 28],
[5, 9, 10, 13, 18, 23, 28],
[7, 9, 10, 13, 17, 18, 28],
[7, 9, 10, 13, 18, 21, 28]]