We can get the file name of the path with the basename method as follows: from pathlib import Path import os path = Path('./foo/bar.txt')
確定! 回上一頁