Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
str.splitlines([keepends]) solution in Clear category for Non Empty Lines by David_Jones
def non_empty_lines(text):
return sum(map(bool, map(str.strip, text.splitlines())))
April 29, 2020