Write a function that takes one argument a string file name


Question: Write a function that takes one argument: a string file name. The function should return a list of lists such that each list is a list of the words in each line. In addition:

(a) Remove all whitespace from each word and remove all punctuation. The string module constants will be useful for the last task.

(b) Clean the words before placing them in the list. Specifically, convert all words to lowercase and throw out any "words" that contain anything other than letters.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a function that takes one argument a string file name
Reference No:- TGS02478844

Now Priced at $15 (50% Discount)

Recommended (92%)

Rated (4.4/5)