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