Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
single re solution in Clear category for Non Empty Lines by juestr
import re
nel = re.compile(r'^.*[\S].*$', re.MULTILINE)
def non_empty_lines(text: str) -> int:
return len(nel.findall(text))
Sept. 6, 2021