📌  相关文章
📜  将所有文件名存储在文件夹中 python 代码示例

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

代码示例3
import os
#this command will store all .txt files in same directories
ALL_FILES_IN_DIR = [ELEM for ELEM in os.listdir() if "txt" in ELEM]

#ALL DIRETORIES 
ALL_DIR = [ELEM for ELEM in os.listdir() if "." not in ELEM]