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.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.