python學習--pathlib路徑操作

pathlib模塊 from pathlib import Path 目錄 初始化 路徑拼接和分解 操作符 / : Path對象 / Path對象 Path對象 / 字符串 或者 字符串 / Path對象 分解: parts屬性, 可以返回路徑中的每一部分 joinpath: joinpath(*other) 連接多個字符串到Path對象中 獲取路徑 str() 獲取路徑字符串 bytes() 獲
相關文章
相關標籤/搜索