I am trying to figure out how I can count the uppercase letters in a string.
I have only been able to count lowercase letters:
def n_lower_chars(st
Using len and filter :
len
filter
import string value = "HeLLo Capital Letters" len(filter(lambda x: x in string.uppercase, value)) >>> 5