您的位置: 首页 > IT文章 > Python同时打开两个文件 Python同时打开两个文件 分类: IT文章 • 2025-01-30 15:18:19 with open('a.txt')as f1,open('b.txt')as f2: data1,data2 =f1.read(),f2.read() print(data1) print(data2)