Advertisement
selebry

dsa

Nov 10th, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. first_letters = ['М', 'Ц', 'Н', 'И']
  2. second_letters = ['С', 'Ь', 'Т', 'О']
  3. third_letters = ['З', 'Т', 'И', 'Д']
  4. fourth_letters = ['Ф', 'Я', 'Х', 'С']
  5. fifth_letters = ['Е', 'Р', 'Ж', 'В']
  6.  
  7. all_words = []
  8.  
  9. for first in first_letters:
  10. for second in second_letters:
  11. for third in third_letters:
  12. for fourth in fourth_letters:
  13. for fifth in fifth_letters:
  14. word = first + second + third + fourth + fifth
  15. all_words.append(word)
  16.  
  17. # Выводим первые 10 слов для проверки
  18. for el in all_words:
  19. print(el)
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement