1.把一个数字的list从小到大排序,然后写入文件,然后从文件中读取出来文件内容,然后反序,在追加到文件的下一行中 import codecs list1 = [2,23,8,54,86,12] list1.sort() with codecs.open('1.txt','wb') as f: f.write(str(list1)) with codecs.open('1.txt','rb') as f: print (f.read()) list1.reverse() with codecs.…