count all upper case letters, lower case letters, digits, and symbols from a string code example
Example: Count upper case characters in a string
def n_upper_chars(string):
return sum([int(c.isupper()) for c in string])
def n_upper_chars(string):
return sum([int(c.isupper()) for c in string])