Python Foundations · Lesson 9 of 12Strings and formatting
Character indexing, slices and formatted output. Learn through short examples, practical tasks and targeted questions.
← All lessons
Processing strings
Strings are sequences of characters, so indexing and slicing work in much the same way as with lists. Formatted strings can combine text with variable values for readable output. Experiment with a short word and label its character positions.
Watch out: String indexes start at zero. Slices exclude the ending position, which can surprise students when counting characters.
A free TutorSyntax programming lesson. About our teaching approach.