We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Here is my completely overengineered Solution for you:
import re
if name == 'main':
s = input()
m = re.search(r'(?=(.\w)?)(?=(.[A-Za-z])?)(?=(.\d)?)(?=(.[a-z])?)(?=(.*[A-Z])?)', s)
print('\n'.join([str(bool(group)) for group in m.groups()]))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
String Validators
You are viewing a single comment's thread. Return to all comments →
Here is my completely overengineered Solution for you:
import re
if name == 'main': s = input() m = re.search(r'(?=(.\w)?)(?=(.[A-Za-z])?)(?=(.\d)?)(?=(.[a-z])?)(?=(.*[A-Z])?)', s) print('\n'.join([str(bool(group)) for group in m.groups()]))