Lesson 15: Python and Regex (Part 02)

Watch the video above.

Rather than provide key concepts here, I am simply going to provide you with the code discussed in the video. Experiment with this code and try to figure out what is happening at each stage. Pay attention to the format of the text file, scripture.txt, before and after you run the code. Notice that I do not use the with operator for files. Rather I am manually opening them and closing them.

This is the coding exercise for this lesson. When you are comfortable with this, feel free to progress to Lesson 16: Python, Excel, and XLRD.