Answers for "how to count lowercase letters in python"

1

Python Program to count the number of lowercase letters and uppercase letters in a string.

string=raw_input("Enter string:")
count1=0
count2=0
for i in string:
      if(i.islower()):
            count1=count1+1
      elif(i.isupper()):
            count2=count2+1
print("The number of lowercase characters is:")
print(count1)
print("The number of uppercase characters is:")
print(count2)
Posted by: Guest on October-27-2020
5

how to check if a letter is lowercase in python

for c in s:
    if c.islower():
         print c
Posted by: Guest on May-27-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 "how to count lowercase letters in python"

Python Answers by Framework

Browse Popular Code Answers by Language