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