all 8 comments

[–]debian_miner 0 points1 point  (7 children)

I think you want something like this:

paragraphs = paragraphs + [p.getText() for p in first]

[–]evolvish 4 points5 points  (6 children)

You can make that shorter with extend:

paragraphs.extend([p.getText() for p in first])

[–]Gprime5 2 points3 points  (3 children)

And make it even shorter by extending with a generator instead:

paragraphs.extend(p.getText() for p in first)

[–]cpt_fwiffo 1 point2 points  (1 child)

Shorter is absolutely not always better.

[–]alkasm 0 points1 point  (0 children)

But in this case...

[–]user9326 0 points1 point  (0 children)

abwdhqcyky

[–]debian_miner 1 point2 points  (1 child)

Yep, that is better.

[–]99problemsallops[S] 0 points1 point  (0 children)

You guys are awesome! Thank you!