You can use str.isalpha().

For example:

s = 'a123b'

for char in s:
    print(char, char.isalpha())

Output:

a True
1 False
2 False
3 False
b True
Answer from rainer on Stack Overflow
🌐
W3Schools
w3schools.com › python › ref_string_isalpha.asp
Python String isalpha() Method
The isalpha() method returns True if all the characters are alphabet letters (a-z). Example of characters that are not alphabet letters: (space)!#%&? etc. ... No parameters. Check if all the characters in the text is alphabetic:
🌐
Codecademy
codecademy.com › docs › python › strings › .isalpha()
Python | Strings | .isalpha() | Codecademy
October 9, 2023 - The .isalpha() string method checks if all of the characters in a string are letters of the alphabet (a-z). The letters can be lowercase or uppercase. If the string only contains letters of the alphabet it returns True, otherwise it returns False.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-string-isalpha-method
Python String isalpha() Method - GeeksforGeeks
October 3, 2025 - Explanation: The string s1 are contains only alphabetic characters, so isalpha() returns True but the string s2 contains non-alphabetic characters so isalpha() returns False ... No parameters are required.
🌐
Scaler
scaler.com › home › topics › isalpha() in python
isalpha() in Python - Scaler Topics
April 7, 2024 - The isalpha() function is a built-in function used for string handling in python, which checks if the single input character is an alphabet or if all the characters in the input string are alphabets.
🌐
Vultr Docs
docs.vultr.com › python › standard-library › str › isalpha
Python str isalpha() - Check Alphabetic Characters | Vultr Docs
November 26, 2024 - The isalpha() method in Python's string class is a straightforward yet powerful tool for checking whether a string contains only alphabetic characters. This method returns True if all characters in the string are alphabetic (i.e., they are part ...
🌐
TutorialsPoint
tutorialspoint.com › how-do-i-check-if-a-string-has-alphabets-or-numbers-in-python
How do I check if a string has alphabets or numbers in Python?
September 2, 2025 - In Python, you can check whether a string contains letters, numbers, or both using built-in string methods such as isalpha(), isdigit(), and isalnum(). You can also use loops or regular expressions for more customized checks.
🌐
Quora
quora.com › How-do-you-check-if-the-given-character-is-an-alphabet-in-Python
How to check if the given character is an alphabet in Python - Quora
Originally Answered: How do you check if a character is a letter in Python? · ... The isalpha() method uses whether the character is marked as a letter in the Unicode database - so this means it will deal with international character sets too.
Find elsewhere
🌐
PREP INSTA
prepinsta.com › home › python program › python program to check whether a character is an alphabet or not
Character is alphabet or not in python | Programming | PrepInsta
October 13, 2022 - char = input(‘enter a character’) if char.isalpha(): print(‘The char contains only alphabets’) else: print(‘The char contains different values along with alphabets’) ... a=input(“”) s=”A”,”E”,”I”,’O’,’U’,’a’,’e’,’i’,’o’,’u’ q=0 for i in s: if(a==i): q=q+1 if(q>=1): print(“vowel”) else: print(“not a vowel”) ... # Program to check the char is alphabet r not c=input(“Enter a char: “) print(c,”Is Alphabet”) if c.isalpha() else print(c,”Is not alphabet”)
🌐
LabEx
labex.io › tutorials › python-how-to-check-if-a-character-is-a-letter-in-python-559499
How to Check If a Character Is a Letter in Python | LabEx
In this lab, you learned how to use the isalpha() method in Python to check if all characters in a string are letters. You created a letter_check.py file and experimented with different strings, including those containing only letters, letters ...
🌐
CodeScracker
codescracker.com › python › program › python-program-check-alphabet.htm
Python Program to Check Alphabet or Not
This program does the same job as of previous program, but using a user-defined function named checkAlphabet(). This function receives the character entered by user as its argument and returns 1, if it is an alphabet, otherwise returns 2.
🌐
Tutorial Gateway
tutorialgateway.org › python-program-to-check-character-is-alphabet-or-not
Python Program to check character is Alphabet or not
April 7, 2025 - ch = input("Please Enter Your Own Character : ") if((ch >= 'a' and ch <= 'z') or (ch >= 'A' and ch <= 'Z')): print("The Given Character ", ch, "is an Alphabet") else: print("The Given Character ", ch, "is Not an Alphabet") Checking whether the ...
🌐
Know Program
knowprogram.com › home › python program to check whether character is alphabet
Python Program to Check Whether Character is Alphabet
April 24, 2021 - # Python program to check whether a character is alphabet or not # take input ch = input("Enter any character: ") # check charater is alphabet or not if(ch.isalpha()): print(ch, "is an Alphabet.") else: print(ch, "is not an Alphabet.")
🌐
TutorialsPoint
tutorialspoint.com › article › How-to-check-if-a-character-in-a-string-is-a-letter-in-Python
How to check if a character in a string is a letter in Python?
March 25, 2025 - import string text = "Hello World" index = 1 if text[index] in string.ascii_letters: print(f"The character '{text[index]}' at index {index} is a letter") else: print(f"The character '{text[index]}' at index {index} is not a letter") ... Regular ...
🌐
YouTube
youtube.com › watch
Check If String Contains Any Letters from Alphabet in Python (Example) | any() & isalpha() Functions - YouTube
How to test whether a character string contains one or multiple alphabetical letters in the Python programming language. More details: https://statisticsglob...
Published   March 17, 2023
🌐
Programiz
programiz.com › python-programming › methods › string › isalpha
Python String isalpha()
name = "MonicaGeller" if name.isalpha() == True: print("All characters are alphabets") else: print("All characters are not alphabets.")
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-test-if-string-contains-alphabets-and-spaces
Test if String Contains Alphabets and Spaces - Python - GeeksforGeeks
July 12, 2025 - This method iterates through each character in the string, checking whether all characters are either alphabets (isalpha()) or spaces (isspace()) and the all() function ensures the condition holds true for the entire string. ... s = "geeksforgeeks is best for geeks" # Check if all characters are alphabets or spaces res = s != '' and all(c.isalpha() or c.isspace() for c in s) print("Does the string contain only alphabets and spaces:", res)
🌐
Note.nkmk.me
note.nkmk.me › home › python
Check If a String Is Numeric, Alphabetic, Alphanumeric, or Ascii | note.nkmk.me
May 19, 2023 - The isalpha() method determines if all characters in the string belong to the alphabetic category, i.e., those with a Unicode character database general category property of Lm, Lt, Lu, Ll, or Lo.
🌐
GeeksforGeeks
geeksforgeeks.org › python-string-isalpha-application
Python String isalpha() and its application - GeeksforGeeks
April 1, 2020 - In Python, isalpha() is a built-in method used for string handling. The isalpha() methods returns “True” if all characters in the string are alphabets, Otherwise, It returns “False”. This function is used to check if the argument includes ...
🌐
Devcuriosity
devcuriosity.com › manual › details › python-isalpha-function
Python - isalpha() - Check if a string contains only letters
string.isalpha() is a method that we can call on string, byte, and bytearray objects. It checks if a given object contains only letters or rather - alphabetic characters.