Question 21 markMCQSection A

Identify the output of the following code snippet :

``python

s = "the Truth"

print(s.capitalize())

``

Review of Python Basics (Class XI Recap)
String Methods — capitalize()

Options

(A)The truth
(B)THE TRUTH
(C)The Truth
(D)the Truth

Official answer

Option A — The truth is the correct output, because str.capitalize() converts only the first character of the string to uppercase and forces every other character to lowercase.

Answer keywords:capitalize()string methodscase conversionPython string functionsuppercaselowercase

Marking scheme

  1. 1.1 mark: for correctly selecting option A (`The truth`).

Hint

capitalize() makes ONLY the first letter uppercase and forces everything else to lowercase.

Quick oral answer

capitalize() uppercases only the first character of the string and lowercases all the rest, so 'the Truth'.capitalize() gives 'The truth'.

Common mistakes

  1. 1.Confusing capitalize() with title(), which capitalizes the first letter of every word.
  2. 2.Assuming capitalize() only affects the first letter and leaves the rest of the string unchanged.

Analysis and explanation

The capitalize() method has a specific two-part behaviour that many students overlook.


Concept

  • capitalize() converts the first character of the string to uppercase.
  • It also converts all remaining characters to lowercase, regardless of their original case.
  • Applied to "the Truth": first char t → T; remaining he Truth → he truth (the capital T in Truth is forced to lowercase).
  • Result: "The truth".

Why other options are wrong

  • Option B (THE TRUTH) — this would be the result of .upper(), not .capitalize().
  • Option C (The Truth) — wrongly assumes only the first letter changes and the rest of the string is left untouched; but capitalize() lowercases everything else too.
  • Option D (the Truth) — this is the unchanged original string; it ignores that capitalize() does modify the first character.

Exam trap

  • Students confuse capitalize() (only first char upper, rest lower) with title() (every word's first letter upper).

Interesting facts

Python string methods like capitalize(), upper(), lower() always return a NEW string — strings are immutable, so the original string s remains unchanged.

capitalize() was designed to match natural sentence casing, which is why it forces the rest of the string to lowercase, unlike title().

Question details

Q2 of 48 questions

Board
CBSE
Class
Class 12
Subject
Computer Science
Year
2026
Section
Section A
Marks
1
Type
MCQ
Chapter
Review of Python Basics (Class XI Recap)
Topic
String Methods — capitalize()
Bloom's level
apply
Syllabus topic
Unit 1: Computational Thinking and Programming – 2 — String Manipulation: capitalize() method
Author
CBSE
Reviewed by
Padhantu Academic Team

Spotted a mistake or something unclear?

Tell us and we will fix it.

Frequently asked questions

What is the difference between capitalize() and title() in Python?

capitalize() uppercases only the first character of the entire string and lowercases the rest; title() uppercases the first letter of every word in the string. For 'the truth of life', capitalize() gives 'The truth of life' while title() gives 'The Truth Of Life'.

Does capitalize() modify the original string?

No. Strings are immutable in Python, so capitalize() returns a new string; the original string remains unchanged unless reassigned.