Python Program to Check Alphabet


In this tutorial, we are going to write a Python program and check whether the entered character is an Alphabet or not. In this python program, we are going to take the input from user and check entered character is alphabet or not.


Python Program to check character is Alphabet or not

# getting the input from user


ch = input("Enter a character to check alphabet or not: ")

if((ch>='a' and ch<= 'z') or (ch>='A' and ch<='Z')):

print("The Input Character ", ch, "is an Alphabet")

else:

print("The Input Character ", ch, "is not an Alphabet")

 


 

Leave a Reply

Your email address will not be published. Required fields are marked *