os.system change directory python code example Example: python cd to directory import os os.chdir(path)