You are viewing a single comment's thread. Return to all comments →
Or just:
checks = ['isalnum', 'isalpha', 'isdigit', 'islower', 'isupper'] results = [False for _ in range(len(checks))] to_check = checks[:] for char in input().strip(): if not to_check: break for check in to_check: if getattr(char, check)(): results[checks.index(check)] = True to_check.remove(check) print(*results, sep='\n')
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 →
Or just: