From the string method istitle(), the Python 2.6.5 manual says:
Returns true if the string is a title bar and there is at least one character, for example, uppercase characters can only follow uncommitted characters, and lowercase letters can only be truncated. Otherwise, returns false.
But in this case, it returns false:
>>> book = 'what every programmer must know'
>>> book.title()
'What Every Programmer Must Know'
>>> book.istitle()
False
What am I missing?
source
share