\programs\python\python so the filename project docx refers to :\users\al \appdata\local\programs\python\python \project docx when we change the current working directory to :\windows\system the filename project docx is interpreted as :\windows\system \project docx python will display an error if you try to change to directory that does not exist os chdir(' :/thisfolderdoesnotexist'traceback (most recent call last)file ""line in filenotfounderror[winerror the system cannot find the file specified' :/thisfolderdoesnotexistthere is no pathlib function for changing the working directorybecause changing the current working directory while program is running can often lead to subtle bugs the os getcwd(function is the older way of getting the current working directory as string the home directory all users have folder for their own files on the computer called the home directory or home folder you can get path object of the home folder by calling path home()path home(windowspath(' :/users/al'the home directories are located in set place depending on your operating systemon windowshome directories are under :\users on machome directories are under /users on linuxhome directories are often under /home your scripts will almost certainly have permissions to read and write the files under your home directoryso it' an ideal place to put the files that your python programs will work with absolute vs relative paths there are two ways to specify file pathan absolute pathwhich always begins with the root folder relative pathwhich is relative to the program' current working directory there are also the dot and dot-dot folders these are not real folders but special names that can be used in path single period