string and number characters capitalize show code example
Example 1: Count upper case characters in a string
def n_upper_chars(string):
return sum([int(c.isupper()) for c in string])
Example 2: how do you change a string to only uppercase in python
original = Hello, World!
#both of these work
upper = original.upper()
upper = upper(original)