Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import permutations
- a = map(''.join, permutations('ОЛЬГА', r=5))
- words = []
- for i in a:
- if i.index('Ь') == 0 or 'ОЬ' in i or 'АЬ' in i:
- continue
- else:
- words.append(i)
- print(len(words))
Add Comment
Please, Sign In to add comment