Â
In this we are going to see a basic example about a Function that Accepts a String and find no. of Upper and Lower Case Letters - Type 4 of Functions in Python Programming Language.
def upper_lower(str):
upper = 0
lower = 0
for i in str:
if i.isupper():
upper = upper + 1
elif i.islower():
lower = lower + 1
return upper, lower
x = upper_lower("Help For Coders")
print("Upper Case : ", x[0])
print("Lower Case : ", x[1])
# Coded By DHIRAJ SHELKE
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP