String Validators

  • + 0 comments
    if __name__ == '__main__':
        s = input()
    
        check_validation = {"Check isalnum": lambda s: s.isalnum(),
                            "Check isalpha": lambda s: s.isalpha(),
                            "Check isdigit": lambda s: s.isdigit(),
                            "Check islower": lambda s: s.islower(),
                            "Check isupper": lambda s: s.isupper()}
    
        check = [any([check_validation[check](character) for character in s]) for check in check_validation]
        for i in check:
            print(i)