how to check if string is a letter python code example
Example 1: python check if character is letter
>>> 'A'.isalpha()
True
>>> '1'.isalpha()
False
Example 2: what does isalpha do in python
The isalpha() method returns True if all the characters are alphabet letters (a-z).