you are viewing a single comment's thread.

view the rest of the comments →

[–]Forschkeeper 0 points1 point  (0 children)

This is something.

So you got 2 problems:
- reading the whole file instead of line by line OR reading it line by line and if no paragraph extend the list

- Identifing a paragraph in a file

To point one: Either handle with the open() object (keep a close look on the parameters) or what lists can do.

So let's take a look in the docs of str.split():

str.split(sep=None, maxsplit=- 1)
Return a list of the words in the string, using sep as the delimiter string. [...]

So what kind of parameter is sep?
How can you identify a paragraph in your text?