給定一個路徑,如 "mydir/myfile.txt",我如何找到文件相對於 Python 中當前工作目錄的絕對路徑?例如在 Windows 上,我可能會結束與:
"mydir/myfile.txt"
"C:/example/cwd/mydir/myfile.txt"