Answers for "Count upper case characters in a string"

1

Count lower case characters in a string

def n_lower_chars(string):
    return sum([int(c.islower()) for c in string])
Posted by: Guest on November-19-2020
0

Count upper case characters in a string

def n_upper_chars(string):
    return sum([int(c.isupper()) for c in string])
Posted by: Guest on November-19-2020

Code answers related to "Count upper case characters in a string"

Python Answers by Framework

Browse Popular Code Answers by Language