Skillshare intro to Python/Unit 5: Difference between revisions

imported>Jesstess
imported>Jesstess
Line 56:
==Breaking down the problem==
 
===Step 1: construct a Python word list===
 
Our goal is to turn the words in the <code>sowpods.txt</code> file into a Python list.
Write the code to open and read the sowpods word file. Create a list, where each element is a word in the sowpods word file. Note that each line in the file ends in a newline, which you'll need to remove from the word.
 
WriteTo do this, write the code to open and read the contents of <code>sowpods.txt</code> wordline fileby line. CreateAs you go through each line in the file, build up a Python list, where each element in the list is a word in thefrom <code>sowpods word file.txt</code>. Note that each line in the file ends in aan invisible newline, which you'll need to remove from the word.
 
<b>Step 1 resources</b>:
Line 69 ⟶ 71:
</li>
</ul>
 
 
===Step 2: get the rack===
Anonymous user