Working with Text
Real text is messy: capital letters, extra spaces, punctuation, lines that arrive in a strange form. Most programs spend much of their time reading, cleaning and cutting text. In this course you cut text with split, glue it with join, clean it with strip, lower and replace, count the words with a dictionary, write and break a secret code, and check palindromes and anagrams. A lesson on looking inside text shows how to find a piece, test the kind of characters, and read a line such as name equals value. A text toolkit with a table of tests is the project at the end. The practice runs your functions on messy inputs and tells you which ones fail.