(path)
Yield non-empty lines from file at path
Yield non-empty lines from file at path
Yield non - empty lines from file at path
def non_empty_lines(path):
    """
    Yield non-empty lines from file at path
    """
    with open(path) as f:
        for line in f:
            line = line.strip()
            if line:
                yield line
def non_empty_lines ( path ) : with open ( path ) as f : for line in f : line = line . strip ( ) if line : yield line