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.
if name == 'main':
s = input()
alphanum = False
alphabetical = False
number = False
lowercase = False
Uppercase = False
for i in s:
if alphanum == False:
if(i.isalnum()):
alphanum = True
if alphabetical == False:
if(i.isalpha()):
alphabetical = True
if number == False:
if(i.isdigit()):
number = True
if lowercase == False:
if(i.islower()):
lowercase = True
if Uppercase == False:
if(i.isupper()):
Uppercase = True
print(f"{alphanum}\n{alphabetical}\n{number}\n{lowercase}\n{Uppercase}")
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 →
if name == 'main': s = input() alphanum = False alphabetical = False number = False lowercase = False Uppercase = False