标签:project += pre 成功 src mic color jenkin inf
示例路径为:/data/jenkins/test/
怎样取到路径最后一级所在的路径呢?
project_path = ‘‘ path = ‘/data/jenkins/test/‘ for i in path.split(‘/‘)[1:-2]: project_path += ‘/‘+i print(project_path)
以上代码,即可成功将路径切分
标签:project += pre 成功 src mic color jenkin inf
原文地址:https://www.cnblogs.com/lutt/p/12207701.html