Advertisement
nq1s788

Untitled

Sep 1st, 2023
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. def is_word(s):
  2.     alph = 'АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя'
  3.     for c in s:
  4.         if not c.isalpha() and c not in alph:
  5.             return False
  6.     return True
  7.  
  8.  
  9. text = input().split()
  10. answ = 0
  11. for e in text:
  12.     answ += is_word(e)
  13. print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement