def METHOD_NAME(lines):
    """removes blank lines and commented lines"""
    lines2 = []
    for line in lines:
        line2 = line.split('#')[0].strip()
        if line2:
            lines2.append(line2)
    return lines2