|
|
|
|
|
by eidorb
1479 days ago
|
|
I may have gone with the following. Yes, some characters are repeated, but I'm not playing code golf. stripped_lines = (line.strip() for line in buffer.readlines())
non_empty_stripped_lines = [line for line in stripped_lines if stripped_lines]
|
|
Breaking down things in clear steps is underrated I think.