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