def textfile_to_int_set(filename):
    """
    读取文本文件，每行一个数据，返回集合
    :param filename:
    :return:
    """
    data = set()
    with open(filename, 'r') as f:
        for line in f.readlines():
            n = len(line)
            if n > 0 and line[n - 1] == '\n':
                line = line[:n - 1]
                n -= 1
            if n == 8:
                data.add(int(line))
    return data
