1 # ------多行写入------ 2 nums = ['one','two','three','four','five','six','seven'] 3 t = open(r'd:\python_fileprocess\t2.txt','a') 4 for get_one in nums: 5 t.write(get_one+'\n') 6 t.close() 7 print('连续写入完成!')