Python Reference Library →

Python String lower() Method – Convert to Lowercase

Let’s look at string lower() method – convert to lowercase

  1. Notice

    lower() returns a lowercase version using Unicode case rules. The source string remains unchanged.

  2. Try

    Follow the example, change its sample, and compare what happens.

  3. Check

    Explain the result and test your understanding.

Watch how it works

Focus on how the names, objects, and calculations change. We’ll inspect the printed output in the next section.

Explore the idea

Follow the code and watch its state change. Guided simulation.

Code
Python
text = 'HELLO'
result = text.lower()
print(result)
Live state

Top-level scope

text→Object 1
result→Object 2
Object 1 · str'HELLO'Object 2 · str'hello'
This step

lower() returns a lowercase version using Unicode case rules. The source string remains unchanged.

Picture string lower() method – convert to lowercase

lower() returns a lowercase version using Unicode case rules. The source string remains unchanged.

Image brief

Alt text
A diagram for Python String lower() Method – Convert to Lowercase. Instructions: text = 'HELLO' result = text.lower() print(result). Displayed result: hello. The final example bindings are text --> object 1 (str); result --> object 2 (str). object 1: 'HELLO'; object 2: 'hello'
Image generation prompt
Create a clean educational illustration for a Python programming lesson titled "Python String lower() Method – Convert to Lowercase". Teaching focus: lower() returns a lowercase version using Unicode case rules. The source string remains unchanged. Depict exactly the relationships and labels in this reference diagram: EXAMPLE INSTRUCTIONS text = 'HELLO' result = text.lower() print(result) | v DISPLAYED RESULT hello FINAL BINDINGS text --> object 1 (str) result --> object 2 (str) object 1: 'HELLO' object 2: 'hello' Use a flat vector style, generous spacing, clear arrows and legible labels, with a restrained blue/teal palette on a plain background. The diagram must explain the programming idea accurately. Do not depict variables as boxes containing copied objects when they share a reference. Avoid mascots, decorative screenshots, logos, gradients and extra text. Landscape composition, approximately 3:2, suitable for a course card. Accessible description: A diagram for Python String lower() Method – Convert to Lowercase. Instructions: text = 'HELLO' result = text.lower() print(result). Displayed result: hello. The final example bindings are text --> object 1 (str); result --> object 2 (str). object 1: 'HELLO'; object 2: 'hello'

Follow the execution

Choose a different sample input, then follow every step through to the output. Before revealing it, predict what the program will display.

Execution workspace

Choose a sample and follow its execution. Guided simulation.

Code
Python
text = 'HELLO'
result = text.lower()
print(result)
Live state

Top-level scope

text→Object 1
result→Object 2
Object 1 · str'HELLO'Object 2 · str'hello'
This step

The example has finished. Compare the final output with the values and references above.

Terminal
Output
hello

What do you expect this program to print?

What does this example display?

text = 'HELLO'
result = text.lower()
print(result)
What does this example display?
Choose one answer. You can try again.

Answer and explanation

hello

Follow the printed values in order. The output is: hello

More examples and reference

Python String lower() Method

The lower() method in Python is used to convert all the characters in a string to lowercase. It's useful when comparing strings or working with user input where case sensitivity doesn't matter.

Syntax

string.lower()

Parameters:

  • None – This method does not take any arguments.

Returns:

  • A new string where all uppercase characters are converted to lowercase.

Example 1: Basic Usage

text = "HELLO WORLD"
print(text.lower())
hello world

Example 2: Mixed Case String

greeting = "GoOd MoRnInG"
print(greeting.lower())
good morning

Why Use lower()?

  • To make string comparison case-insensitive.
  • To clean up user input before storing or validating.
  • To normalize data for searching or sorting.

Example 3: Comparing Strings

a = "Python"
b = "PYTHON"
print(a.lower() == b.lower())
True

Even though the original strings differ in case, they are equal after using lower().

Does lower() Change the Original String?

No, strings in Python are immutable. The lower() method returns a new string — it doesn’t modify the original one.

Common Mistake

name = "ALICE"
name.lower()
print(name)
ALICE

Why? Because name.lower() returns a new string, but it wasn't assigned back to name.

Correct Way:

name = name.lower()
print(name)

Summary

  • lower() converts a string to lowercase.
  • Returns a new string — original is not changed.
  • Helps with case-insensitive comparisons and text cleaning.

Practice Problem

Ask the user to input a sentence and print it in lowercase.

text = input("Enter a sentence: ")
print("In lowercase:", text.lower())

What to remember

Connect what you noticed in the example with the idea below.

Remember

lower() returns a lowercase version using Unicode case rules. The source string remains unchanged.

Watch out for this idea

lower() changes the source string in place.

This is the misconception to avoid.

Reference checks are optional and do not count toward course progress.

    Reference library →