Courseiva
Strings →easyMultiple Choice

PCAP Strings Practice Question

What is the result of 'PyThon'.lower()?

⚠ Common exam trap

Python Institute often tests the distinction between `.lower()`, `.upper()`, `.capitalize()`, and `.swapcase()`, so the trap here is that candidates may confuse `.lower()` with `.capitalize()` (which only lowercases the rest after capitalizing the first letter) or assume `.lower()` only affects the first letter.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

'python'

The `.lower()` method in Python returns a new string with all alphabetic characters converted to lowercase. Since the original string 'PyThon' contains uppercase 'P' and 'T', applying `.lower()` yields 'python'. Option B is correct because it is the only option that shows all characters in lowercase.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    'Python'

    Why it's wrong here

    The string method lower() performs case folding only in the downward direction: every uppercase character in the original string is replaced by its lowercase equivalent, and characters that are already lowercase or uncased are left alone. Applied to 'Python', the leading 'P' is converted to 'p', producing 'python', not 'Python' with a capital initial. Retaining the uppercase 'P' would require titlecasing or simply omitting the method call, so this option contradicts the documented behavior of lower().

  • ✓

    'python'

    Why this is correct

    Calling lower() on the string 'Python' returns a brand new string object 'python' because the method transforms the single uppercase character 'P' into its lowercase counterpart 'p' while leaving the subsequent 'ython' unchanged since those characters have no uppercase forms. The result is exactly 'python', confirming that the method performs a case conversion rather than, say, a formatting or trimming operation. This is the canonical expected output of 'Python'.lower().

  • ✗

    'PYTHON'

    Why it's wrong here

    The output 'PYTHON' would be produced by str.upper(), the direct inverse operation, not by lower(). The lower() method actively seeks out uppercase characters—here only 'P'—and converts them to lowercase, so it cannot yield an all-uppercase string. Moreover, lower() never adds or alters characters other than case mapping, meaning the original string's length and order remain intact; 'Python' has only one uppercase character, so only one character can change.

  • ✗

    'pYTHON'

    Why it's wrong here

    The mixed-case string 'pYTHON' would require some characters to be lowered and others to be uppercased simultaneously, which lower() does not do; it applies the same downward mapping uniformly to every character. In the original 'Python', the characters after the first are already lowercase, so they stay lowercase, and the 'P' becomes 'p', yielding 'python'—not 'pYTHON'. A result like 'pYTHON' could come from a custom swapcase or a targeted replace, not from a single call to lower().

About these practice questions

One of 421 original PCAP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCAP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCAP exam.