Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import permutations
- a = list(permutations('ААААВВРР'))
- prev = set()
- num = 1
- for e in a:
- s = ''.join(e)
- if s not in prev:
- print(num, s) #здесь проверять слово
- prev.add(s)
- num += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement