Example 1: Using pathlib module. import pathlib # path of the given file print(pathlib.Path("my_file.txt").parent.absolute()) # ...
確定! 回上一頁