String Validators

  • + 1 comment
    s = input()
        is_alnum = False
        is_alpha = False
        is_digit = False
        is_lower = False
        is_upper = False
    
        for c in s:
            if c.isalnum():
                is_alnum = True
            if c.isalpha():
                is_alpha = True
            if c.isdigit():
                is_digit = True
            if c.islower():
                is_lower = True
            if c.isupper():
                is_upper = True
    
        print(is_alnum)
        print(is_alpha)
        print(is_digit)
        print(is_lower)
        print(is_upper)