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 istitle() Method


previous next AddThis Social Bookmark Button


Description:

This method checks whether all the case-based characters in the string following non-casebased letters are uppercase and all other case-based characters are lowercase.

Syntax:

str.istitle()

Parameters:

Here is the detail of parameters:

  • NA

Return Value:

It returns true if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Returns false otherwise.

Example:

#!/usr/bin/python


str = "This Is String Example...Wow!!!";
print str.istitle();

str = "This is string example....wow!!!";
print str.istitle();

This will produce following result:

True
False


previous next Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names