• one mistake

Question related to mission Non Empty Lines

 

Looking at the solutions in the hints and found a small error:

def non_empty_lines(text: str) -> int:
    # Here we are not using a row counter, but a list of non-empty rows.
    # And as a result, we return its length using len()
    return len(x for x in s.split("\n") if x.strip())

missing square brackets:

return len([x for x in text.split("\n") if x.strip()])

Maybe it will be important for someone...