python how to go to a directory code example Example: python cd to directory import os os.chdir(path)