os.listdir(dire)
时间: 2023-12-26 11:05:06 浏览: 68
list_dir.c
os.listdir(dire)是一个在Python中用于获取指定目录下所有文件和文件夹的函数。它返回一个包含指定目录下所有文件和文件夹名称的列表。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [python中遍历文件的3个方法](https://blog.csdn.net/qq_40741855/article/details/105491266)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Python 列出目录中的文件](https://blog.csdn.net/allway2/article/details/124176562)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文