Python String isalpha() Method
Example
Check if all characters in the text are letters:
txt = "CompanyX" x = txt.isalpha() print(x)
Definition and Usage
If all characters are letters (a-z), the isalpha() method will return True.
Examples of non-letter characters: (space)!#%&? etc.
Syntax
string.isalpha()
Parameter Value
No parameters.
More Examples
Example
Check if all characters in the text are letters:
txt = "Company10" x = txt.isalpha() print(x)