dxnge

11

Oct 13th, 2021 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. from itertools import permutations
  2. a = map(''.join, permutations('ОЛЬГА', r=5))
  3. words = []
  4. for i in a:
  5.     if i.index('Ь') == 0 or 'ОЬ' in i or 'АЬ' in i:
  6.         continue
  7.     else:
  8.         words.append(i)
  9. print(len(words))
Add Comment
Please, Sign In to add comment