PYTHON CORE · LESSON 41

Small letters.

Method of lower · about 9 minutes

Learning with progressRead the summary for free. To save the work, log in to the account.
STEP 1

Text can be changed

lower makes a new line where big letters become small. The old text does not change.

word = "КОТ"
print(word.lower())
How does lower work?
It was.КОТlower()register-changeStalloкот

✦ The screen will be «кот».

STEP 2

Convenient for comparison

A person can write a word in large or small letters. lower helps you compare answers the same way.

answer = "ДА"
print(answer.lower() == "да")

✦ This is True.

IN-CLASS PRACTICE

Type the code yourself

Type an example manually. The dot connects text and method.

word = "МИР"
print(word.lower())
Open the editor for class work
HOMEWORK

Solve it yourself

Save the word «ПРИВЕТ» in word. Put it in small letters with lower.

The answer is hidden. Use similar examples from the lesson notes.

Opening up your homework