Python istitle() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
String

Definition

istitle() returns True when the string is written in title case: every word begins with an upper case letter, and the other letters of the word are lower case. "Python Tutorial" passes, while "Python tutorial" does not.

The string must contain at least one letter. A capital letter may only follow a character that is not a letter, and a lower case letter may only follow another letter. That is the same rule that title() uses to build title case, so text.title().istitle() is normally True.

text.istitle() is a method of the built-in str type: call it on a string with dot notation. No import is needed, and it never changes the original string.

Syntax

Call it on any string. There are no arguments, but the parentheses are required.

python
ok = text.istitle()
CallWhat it does
"Hello World".istitle()Returns True. Each word starts with a capital and continues in lower case.
"Hello world".istitle()Returns False. The second word starts with a lower case letter.
"HELLO".istitle()Returns False. A capital letter may not follow another letter.

To convert text to title case use title(). To check for all capitals use isupper().

Library declarations
python
str.istitle() -> bool
# returns: True if the string is in title case and has at least one letter
# an empty string returns False

Parameters

This method takes no arguments. It always checks the whole string.

Return Value

Return ValueDescription
boolTrue if the string is in title case and contains at least one letter, otherwise False.

Python Examples

Example 1 — Is This Text in Title Case?

Check a title, lower case text, half-capitalized text, and shouted text.

python
samples = ["Python Tutorial", "python tutorial", "Python tutorial", "PYTHON"]
for text in samples:
    print(repr(text), text.istitle())

How It Works

  1. A real title. Both words start with a capital and continue in lower case, so the result is True.
  2. Wrong start. "python tutorial" starts its words with lower case letters, so it is False.
  3. One word is not enough. "Python tutorial" has a lower case second word, and "PYTHON" has capitals after the first letter.

Example 2 — Fix Text Only When Needed

Run title() only on strings that fail the check.

python
headline = "the quick brown fox"

print(headline.istitle())
if not headline.istitle():
    headline = headline.title()

print(headline)
print(headline.istitle())

How It Works

  1. The check fails first. The headline is all lower case, so istitle() prints False.
  2. title() repairs it. Inside the if, title() returns a title case copy, which replaces the old value.
  3. The check now passes. After the change, istitle() is True.

Example 3 — Apostrophes and istitle()

See which spelling of a contraction counts as title case.

python
for text in ["They're Here", "They'Re Here", "Mary's Lamb"]:
    print(text, text.istitle())

print("3rd Place".istitle())

How It Works

  1. The natural spelling fails. In They're, the r after the apostrophe is lower case and follows a non-letter.
  2. The odd spelling passes. They'Re is exactly what title() would produce, so it satisfies the rule.
  3. Digits count as non-letters too. In 3rd Place the r follows the digit 3 and is lower case, so the answer is False.

Frequently Asked Questions

It returns True if the string is in title case: every word starts with an upper case letter and the other letters are lower case.
After the apostrophe the letter r is lower case but follows a character that is not a letter, which breaks the rule. title() would write it as They'Re.
False. The string needs at least one letter.
Call title(), for example text = text.title(). For names with apostrophes, string.capwords() often works better.
isupper() is True when all letters are capitals. istitle() is True when only the first letter of each word is a capital.

Next: isupper()

True if all letters are upper case and there is at least one letter.

isupper() tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful