38. Python Program to check given Input is Digit or Uppercase or Lowercase or Special Character.
How does this program work?
- In this program you are going to learn about how to check given Input is Digit or UpperCase or LowerCase or Special Character using Python.
- Here we are using if-else-if conditions then we can easily get the Output.
Here is the code
ch = input("Enter a character: ")
if ch >= '0' and ch <= '9':
print("Digit")
elif ch.isupper ():
print("Uppercase character")
elif ch.islower ():
print("Lowercase character")
else:
print("Special character")