pathlib 是它的替代品,在 os.path 上的基礎上進行了封裝,實現了路徑的對象 ... p.iterdir() # 相當於os.listdir p.glob('*') # 相當於os.listdir, ...
確定! 回上一頁