Hacker News new | ask | show | jobs
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]
1 comments

Way better IMO. Clear variable names. No golfing.

Breaking down things in clear steps is underrated I think.