要点: 使用with打开文件。不需要关闭文件。 使用zip函数组合两个列表。 不带zip的代码,带内联注释: combine =[] with open("x.txt") as xh: with open('y.txt') as yh: with open("z.txt","w") as zh: # Read More
posted @ 2021-02-06 12:01 人间寒梅 Views(1630) Comments(0) Diggs(0) Edit