Tutorials Point


  Python Basics
  Python Advanced
  Python Useful References
  Python Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

Python String isalpha() Method


previous next AddThis Social Bookmark Button


Description:

This method checks whether the string consists of alphabetic characters only.

Syntax:

str.isalpha()

Parameters:

Here is the detail of parameters:

  • NA

Return Value:

It return true if all characters in the string are alphabetic and there is at least one character, false otherwise.

Example:

#!/usr/bin/python


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

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

This will produce following result:

True
False


previous next Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names