📜  python 打开目录中的每个文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:58.976000             🧑  作者: Mango

代码示例1
import os
for filename in os.listdir(os.getcwd()):
   with open(os.path.join(os.cwd(), filename), 'r') as f: