Python String isalpha() Method
Returns True if all the characters in the string are alphabetic. This would be a-z or A-Z.
Syntax
Python
Copy Code
string.isalpha()
Example
Python
Copy Code
str1 = 'Abc' str2 = "123" print(str1.isalpha()) print(str2.isalpha())
Output
True False