Get the Full Path
Get the Full Path of the Current Working Directory
Example 1: Using pathlib module
import pathlib
// path of the given file
print(pathlib.Path("my_file.txt").parent.absolute())
// current working directory
print(pathlib.Path().absolute())/Users/username
/Users/usernameExample 2: Using os module
Last updated