def write_data_list(list, filename, encoding):
    """리스트 데이터를 위한 쓰기 함수"""
    with open(filename, 'w', encoding=encoding) as f:
        for item in list:
            if len(item) == 1:
                f.write('%s\n' % item[0])
            elif len(item) == 2:
                f.write('%s\t%s\n' % (item[0], item[1]))
            elif len(item) == 3:
                f.write('%s\t%s\t%s\n' % (item[0], item[1], item[2]))
            elif len(item) == 4:
                f.write('%s\t%s\t%s\t%s\n' % (item[0], item[1], item[2],
                    item[3]))
            elif len(item) == 5:
                f.write('%s\t%s\t%s\t%s\t%s\n' % (item[0], item[1], item[2],
                    item[3], item[4]))
            elif len(item) == 6:
                f.write('%s\t%s\t%s\t%s\t%s\t%s\n' % (item[0], item[1],
                    item[2], item[3], item[4], item[5]))
            elif len(item) == 7:
                f.write('%s\t%s\t%s\t%s\t%s\t%s\t%s\n' % (item[0], item[1],
                    item[2], item[3], item[4], item[5], item[6]))
            elif len(item) == 8:
                f.write('%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n' % (item[0], item
                    [1], item[2], item[3], item[4], item[5], item[6], item[7]))
            else:
                print('Error in write_data_list!!')
                print(len(item))
