import os os.getcwd() # returns the path to the current directory as str os.chdir(path) # change directory through the specified path (str)