In this program, we are going to see whether a user given character is an alphabet or not. To check character is an alphabet or not python has built-in function isalpha().
Program
# Take character input from user ch = input("Enter any character : ") # Check for alphabet or not if ch[0].isalpha() : print("\n" + ch[0], "is A ALPHABET.") else : print("\n" + ch[0], "is NOT A ALPHABET.")
Output
Enter any character : x
x IS A ALPHABET.