how to change the directory to the directory in which the python file is present code example Example: change working directory python import os os.chdir(new_working_directory)