path.basename(). import osname = os.path.basename("path/to/file/sample.txt")path = os.getcwd()print(os.path.join(path, name)) Output: A string representing the ...
確定! 回上一頁