【问题标题】:Python3 list files from particular directory [duplicate]Python3列出特定目录中的文件[重复] 【发布时间】:2023-03-13 23:28:01 【问题描述】: 如何列出仅来自特定目录的文件名?我不想要来自子目录或任何东西的文件名。 【问题讨论】: 复制:How to list all files of a directory in Python 标签: python linux file python-3.x filenames 【解决方案1】: os.listdir(dir) 另见 List files in ONLY the current directory 【讨论】: