O'Reilly Introduction to Python/Section 18: Difference between revisions

 
Line 81:
To do this, write the code to open and read the contents of <code>sowpods.txt</code> line by line. As you go through each line in the file, build up a Python list, where each element in the list is a word from <code>sowpods.txt</code>. Note that each line in the file ends in an invisible newline, which you'll need to remove from the word.
 
To check your work, use the <code>len</code> function to print the length of your Python word list. It should contain 267751 (235117) words.
 
<b>Step 1 resources</b>:
Anonymous user