Home >>Python String Methods >Python String isalpha() Method

Python String isalpha() Method

Python String isalpha() Method

Python String isalpha() Method returns True if all the characters in the string are alphabet letters (a-z).

Syntax:
string.isalpha()
Here is an Example of Python String isalpha() Method:

alphatxt = "PhptpointX"
zx = alphatxt.isalpha()
print(zx)

Output:
True
Example 2:

str1 = "phptpoint"   
str2 = str1.isalpha()    
print(str2)  

Output:
True