这里的另一个用户最近帮助我改进了下面的代码。我有整数的排序列表,但我不知道如何获得原始列表,因为with语句关闭了它正在读取的文件。谢谢你的帮助!我仍然是Python的新手。inpList.sort()
if __name__=='__main__': #This is how the main is defined in python
我创建了这段代码,但一直收到错误:ValueError: I/O operation on closed file我能做些什么来纠正这个错误? def eightBitStrings(n): #Assign variable to reference the name of the file... This shall be called EightBits... #Open file above
outputFile =