4 ms·
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.readl
by eidorb 4y 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]
- systemvoltage 4y agoWay better IMO. Clear variable names. No golfing. Breaking down things in clear steps is underrated I think.