String Validators

  • + 0 comments

    if name == 'main': s = input() print(any(c.isalnum() for c in s)) # Check for alphanumeric characters print(any(c.isalpha() for c in s)) # Check for alphabetical characters print(any(c.isdigit() for c in s)) # Check for digits print(any(c.islower() for c in s)) # Check for lowercase characters print(any(c.isupper() for c in s))