Python‎ > ‎str‎ > ‎

str.istitle()


Definition
Return True if S is a titlecased string and there is at least one character in string.

Syntax
str.istitle() -> bool

Parameters
str=string

Examples
The return are as:
 >>> 
>>> x="Python"
>>> x.istitle()
True
>>> x="python"
>>> x.istitle()
False
>>> x="PYTHON Lake Learning Centre"
>>> x.istitle()
False
>>> x="Python Lake Learning Centre"
>>> x.istitle()
True
>>> 


The return are equal to:
 >>> 
>>> "Python Lake".istitle().__eq__(True)
True
>>> "Python Lake".istitle().__ne__(False)
True
>>> "Python lake".istitle().__eq__(True)
False
>>> "python lake".istitle().__eq__(True)
False
>>> "PYTHON LAKE".istitle().__eq__(True)
False
>>>

Comments