Question: Problem 2 * Write a function called SentencePerLine ( filename ) that has one parameter named * This function should accept a pathname to a

Problem 2
* Write a function called SentencePerLine(filename) that has one parameter
named
* This function should accept a pathname to a file and return a list of
strings from the text content of the file
* Each string in the list should have the '
' characters (that appear when
reading the file) removed
* Each string in the list should be one line of actual text in the text file
without any '
' chars, and all the empty strings should be removed from
the list
>>> l = SentencePerLine("aiwl-1k.txt")
>>> type(l)
>>> for line in l:
... print(line)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!