The isalpha method
The isalpha method checks that a string consists only of letters. Nothing is passed to the method parameters. The method returns the Boolean values True or False.
Syntax
string.isalpha()
Example
Let's check that the string consists only of letters:
txt = 'abcade'
print(txt.isalpha())
Result of code execution:
True
Example
Now let's say there are other symbols in the line:
txt = 'abcade12'
print(txt.isalpha())
Result of code execution:
False