Strings and Text in Depth
Slice and search text, use every string method that matters, format output, understand Unicode and bytes, write regular expressions and clean real text.
Almost everything a program touches is text: names, emails, log lines, web pages, file contents, and the prompts and answers of AI models. Phase 1 showed you what a string is. This phase teaches you to work with it like a professional.
You will pick text apart with indexes and slices, use the string methods you will meet every day, format numbers and tables with f-strings, and learn what text really is inside the computer (Unicode code points and bytes), which is where most mysterious bugs with accents, emoji and file encodings come from.
The phase ends with the two big tools of text work: regular expressions, a small language for describing patterns, and a set of habits for cleaning and parsing messy real text such as log files. You will write real code with real output the whole way, with no functions needed yet.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.