>>> a = "/lskdj/lskjd"
>>> b = "lsdkj/;sdsl/"
>>> os.path.join(a,b)
'/lskdj/lskjd/lsdkj/;sdsl/'
>>> os.path.join(b, a)
'/lskdj/lskjd'
>>> c = "/lskdjs/slkdjs"
>>> os.path.join(a, c)
'/lskdjs/slkdjs'
>>> a = "/lskdj/lskjd"
>>> b = "lsdkj/;sdsl/"
>>> os.path.join(a,b)
'/lskdj/lskjd/lsdkj/;sdsl/'
>>> os.path.join(b, a)
'/lskdj/lskjd'
>>> c = "/lskdjs/slkdjs"
>>> os.path.join(a, c)
'/lskdjs/slkdjs'
本文标题:os.path.join()的坑
本文链接:https://www.haomeiwen.com/subject/cnyoaxtx.html
网友评论