You are here : python_2stringstringisalpha

string.isalpha() - string

             

The method isalpha() checks whether the string consists of alphabetic characters only.


  • NA


Syntax

str.isalpha()


Example

#!/usr/bin/python

str = "this";  # No space & digit in this string
print str.isalpha()

str = "this is string example....wow!!!";
print str.isalpha()


Output / Return Value

When we run above program, it produces following result −


True False


Limitations


Alternatives / See Also


Reference