find out how many uppercase letters there 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])