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
More Related Contents:
- Examples for string find in Python
- Finding the position of a word in a string
- How t extract last part of a text in python [duplicate]
- Convert bytes to a string
- How do I lowercase a string in Python?
- Filter pandas DataFrame by substring criteria
- Why do backslashes appear twice?
- Changing one character in a string
- Random string generation with upper case letters and digits
- Converting a string representation of a list into an actual list object [duplicate]
- How to split the definition of a long string over multiple lines?
- using backslash in python (not to escape)
- Find and replace string values in list
- Pandas Extract Number from String
- Longest common substring from more than two strings
- Count consecutive characters
- Find all upper, lower and mixed case combinations of a string
- How does my input not equal the answer?
- Finding occurrences of a word in a string in python 3
- Having both single and double quotation in a Python string
- shuffle string in python
- Count number of words per row
- Convert a columns of string to list in pandas
- What’s the difference between str.isdigit(), isnumeric() and isdecimal() in Python?
- Python: is using “..%(var)s..” % locals() a good practice?
- How does python startswith work?
- How can I match an exact word in a string?
- What does “table” in the string.translate function mean?
- What does backward-slash b do in Python?
- How to pad a string to a fixed length with spaces [duplicate]