Everything you’ve learned about
argv is so you can start reading files. You may have to play with this exercise the most to understand what’s going on, so do it carefully and remember your checks. Working with files is an easy way to erase your work if you are not careful.
This exercise involves writing two files. One is your usual
ex15.py file that you will run, but the other is named
ex15_sample.txt. This second file isn’t a script but a plain text file we’ll be reading in our script. Here are the contents of that file:
This is stuff ...