By Editorial Staff. Updated on
Today we are going to share a Python program to check alphabet or not. If you are a python beginner and want to start learning the python programming, then keep your close attention in this tutorial as I am going to share a Python program to check alphabet or not.
print("Enter '0' for exit.");
ch = input("Enter any character: ");
if ch == '0':
if((ch>='a' and ch<='z') or (ch>='A' and ch<='Z')):
print(ch, "is an alphabet.");
print(ch, "is not an alphabet.");
Enter any character: 5
5 is not an alphabet.
Liked this program? Do Like & share with your friends.
Sharing is caring!