Question: Reading a file in Python: Fill in the read_words function. It takes a string filename as an argument. You may assume this file contains a
Reading a file in Python: Fill in the read_words function. It takes a string filename as an argument. You may assume this file contains a list of words with one word on each line. You should return a list of strings containing all of the words in this file. Use the .strip() string method to remove whitespace from each line of the file as you add it to your list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
