def METHOD_NAME(self, File):
    with open(File, 'r') as F:
        lines = F.readlines()
    for Index in range(len(lines) - 1, -1, -1):
        if lines[Index].strip().startswith("#") or lines[Index] == "\n" or lines[Index] == "\r\n":
            lines.remove(lines[Index])
        elif "#" in lines[Index]:
            lines[Index] = lines[Index].split("#")[0].strip()
        else:
            lines[Index] = lines[Index].strip()
    return lines