def filter_lines_from_comments ( lines ) : for line_nb , raw_line in enumerate ( lines ) : clean_line = remove_comments_from_line ( raw_line ) if clean_line == '' : continue yield line_nb , clean_line , raw_line
remove comment from block of codepython
Filter the lines from comments and non code lines .
def filter_lines_from_comments(lines):
    """ Filter the lines from comments and non code lines. """
    for line_nb, raw_line in enumerate(lines):
        clean_line = remove_comments_from_line(raw_line)
        if clean_line == '':
            continue
        yield line_nb, clean_line, raw_line