11 2022 档案

摘要:两者都可以进行文件遍历, 区别在于glob返回绝对完整路径,而os.listdir返回的是文件名。可以通过一些写法实现等价 但是在数据较多的情况, glob的效率明显低于listdir,可能正则表达式不如直接的 endswith、startswith、in 这类操作效率高。 imgs = glob. 阅读全文
posted @ 2022-11-09 17:08 wioponsen 阅读(568) 评论(0) 推荐(0) 编辑
摘要:ref: https://blog.csdn.net/weixin_39972777/article/details/111103053 在使用rm * 命令删除文件的时候, 会提示参数列表过大, 此时我们可以使用如下方法: 递归删除 find [path] -name ["*"] -print0| 阅读全文
posted @ 2022-11-08 15:03 wioponsen 阅读(92) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示