Name
istitle
Synopsis
s
.istitle( )
Returns True
when letters in
s
are titlecase: a capital letter at the
start of each contiguous sequence of letters, all other letters
lowercase (e.g., 'King
Lear'.istitle( )
is True
). When
s
has no letters, or when at least one
letter of s
violates the titlecase
constraint, istitle
returns
False
(e.g., '1900'.istitle( )
and 'Troilus
and
Cressida'.istitle( )
are
False
).
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.