import fileinput with fileinput.input(files=(path1,path2)) as f: for line in f: print(line) 相关文章: 2021-10-02 2021-06-26 2021-07-21 2022-02-09