how to count how many upper case characters are in 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])