You are viewing a single comment's thread. Return to all comments →
if __name__ == '__main__': s = input() hasNumber= any(char.isdigit() for char in s) hasAlphaNumeric=any(char.isalnum() for char in s) hasAnyAlpha=any(char.isalpha() for char in s) haslowerCase=any(char.islower() for char in s) hasUpperCase=any(char.isupper() for char in s) print("True" if hasAlphaNumeric else "False") print("True" if hasAnyAlpha else "False") print("True" if hasNumber else "False") print("True" if haslowerCase else "False") print("True" if hasUpperCase else "False")
String Validators
You are viewing a single comment's thread. Return to all comments →