摘要: TypeError:can only concatenate list (not "str") to list: 类型错误:只能将list类型和list类型联系起来,而不是str类型; 解决方法: (1)加入list用append添加。 (2)类似这样的写法:"/".join([root_path, 阅读全文
posted @ 2019-02-16 14:32 北向。 阅读(82431) 评论(1) 推荐(0) 编辑
摘要: os.path 1.返回当前目录 举个例子: (1)给出一个目录名称,返回绝对路径 project_path = "Exercise" path = os.path.dirname(os.path.abspath(project_path)) 解析: os.path.dirname(path)是返回 阅读全文
posted @ 2019-02-16 09:51 北向。 阅读(719) 评论(0) 推荐(0) 编辑