python - 使用操作系统访问文件夹
问题描述
我想使用 for 循环和 os.listdir() 遍历文件夹,我只是想知道究竟要在括号中写入什么来访问特定文件。谢谢!
解决方案
你可以很容易地用谷歌搜索。https://www.tutorialspoint.com/python/os_listdir.htm 您只需要括号中的路径。
推荐阅读
- excel - poi-objectmapper 是否将 excel 工作表映射到嵌套对象?如果是这样,应该怎么做?
- php - 使用 jquery 和 php 访问部分 URL 的问题
- javascript - 如何将变量绑定到图像源字符串?
- mysql - 如何替换 TIMESTAMPDIFF 给我“最终”日期并替换
- python - 如何在没有过多嵌套循环的情况下解决“德州扑克”?
- apollo - 有没有办法从突变更新函数中获取变量?
- jquery - 我无法从单个表单字段中获取输入数组
- javascript - 如何将javascript代码中的变量打印到html正文中?
- aws-sdk - Amazon Athena - 使用 Java SDK 将列名称映射到值
- r - 采购时 RStudio 中的环境