You are viewing a single comment's thread. Return to all comments →
s = input()
has_alnum = has_alpha = has_digit = has_lower = has_upper = False
for c in s: if c.isalnum(): has_alnum = True
if c.isalpha(): has_alpha = True if c.isdigit(): has_digit = True if c.islower(): has_lower = True if c.isupper(): has_upper = True
print(has_alnum) print(has_alpha) print(has_digit) print(has_lower) print(has_upper)
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 →
s = input()
has_alnum = has_alpha = has_digit = has_lower = has_upper = False
for c in s: if c.isalnum(): has_alnum = True
print(has_alnum) print(has_alpha) print(has_digit) print(has_lower) print(has_upper)