Programming fundamentals›Strings
Tutorial 6 of 13 · Programming fundamentals · Collections and text · BeginnerStrings
Text as a row of characters: take it apart, put it together, and clean it up.
5 lessons, the last is a challenge · 55 min · Python and Java
Before you startYou finished "Lists": you can read a value by its position, which starts at 0, and go through a list with a loop.
What you’ll be able to do
- 1Read one character or a slice of a string by position, and work out its length.
- 2Use the built-in actions on text (upper, lower, find, replace, strip, split, join) and say what each one gives back.
- 3Explain why a string cannot be changed in place, and build a new string from pieces of an old one.
- 4Go through a string with a loop to count, check or reverse its characters.
Lessons
Next in this path
Next: 7 · Dictionaries and sets · 5 lessons · 55 min
Look things up by name instead of by position, and keep a collection with no repeats.
Playground
Try the same model with your own values. No checks, nothing recorded.
Open the playground