← Python Foundations
9 / 27
Lesson 9 — String toolkit
Text methods
A method is a function attached to a value — you call it with a dot, like s.upper(). Strings have handy methods: upper(), lower(), split(), join(). split() breaks text into a list of pieces.
Tip: len(x) tells you how many items a list has (or how many characters a string has).
Want it another way?
Task
Split the sentence into words and print how many words it has.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
Test your knowledge
A quick 3-question quiz on this lesson — instant feedback.