Write a program to accept a sentence from the user and find the number of upper case letters, lowercase letters and digits by the user. code example

Example 1: Count lower case characters in a string

def n_lower_chars(string):
    return sum([int(c.islower()) for c in string])

Example 2: 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)