Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import functools
- def comp(a, b):
- if len(a) >= len(b):
- return a
- else:
- return b
- s = input()
- print(len(list(filter(lambda x: x == '(', s))) == \
- len(list(filter(lambda x: x == ')', s))))
- print(functools.reduce(comp, s.split()))
- for i in filter(lambda x: \
- len(list(filter(lambda y: \
- not y in \
- 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM', x))) != 0, \
- s.split()):
- print(i, end = ' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement