Below is the program to check whether the given character is an uppercase or lowercase letter or a digit or a special character.
inputChar = input("Enter any character : ")
if inputChar.isupper():
print(str(inputChar) + " character is uppercase letter")
elif inputChar.islower():
print(str(inputChar) + " character is Lower letter")
elif inputChar.isdigit():
print(str(inputChar) + " character is digit ")
else:
print(str(inputChar) + " character is a special character ")
Output:
- Python tutorials
- Input and Output in Python
- f-strings in Python
- end and sep in Python
- Python QuickStart
- Variables in Python
- Data Types in Python
- Operators in Python
- Python program to compute net run rate
- Python program to get biggest number
- Python program to count the frequency of every element
- Python program of list and swap its content
- Python program to get max numbers
- Python program to generate patterns
- Python Program to Check Armstrong
- Python program to print multiplication table
- Python program for domestic electricity bill
- Python program to find maximum number
- Python program to check uppercase or lowercase letter