以下snipet代码会导致此错误: ValueError:关闭文件的I / O操作。
file = open("Groups.txt", 'r')
lineList = [line.strip() for line in file]
choice2 = choicebox("Which group would you like to add the children to?", "Choose a group.",
choices=lineList)
file.close()
file1 = open('%s.txt' % choice2, 'a')
file.write(str(file1) + "\n")
file.close()