Ok! I started this lesson a few weeks ago. Each week I work on programming for just a few hours at PyLadies PDX and go about my business the rest of the week, sometimes coming back to whatever I’m working on during the week, but typically I have enough that keeps me occupied and away from programming Sunday through Friday.
This lesson has been difficult to get through all of the Study Drills of, as I’m having a hard time reducing the code by much, other than just taking out the print statements. I don’t see the need to count the length of the .txt file or to run the EXISTS function, but I also don’t see a need to omit them. He leaves a hint in the Common Student Questions that you ; can ; make ; a ; statement ; one ; line if you want to, but… I have never used semicolons in Python, just C++ (via a few chapters of Michael Dawson’s wonderful book), and I fail to see the good of obfuscating one’s code for sake of just making it one line, as Mr Shaw suggests he can do, I suppose, by separating the lines with a semicolon rather than a return, if that is even possible.
I am also still getting the hang of ARGV, the function that permits me to insert files into the program from the command line. It is not too complicated, it is just not something that I have seen before, and flub it up still on occasion. All the same I see its usefulness and look forward to being able to use it more effectively.
So I shall move on!