| 8permutations |
| 1 | from itertools import * a=list(permutations('АБИКОЛУН')) b=[''.join(x) for x in a] k=len(b) m=0 gl=list(product('АИОУ', repeat=2)) g=[''.join(x) for x in gl] sog=list(product('БКЛН', repeat=2)) s=[''.join(x) for x in sog] for w in b: if all(gs not in w for gs in g+s): print(m, w) m+=1 print(k, m) |
Комментарии