go to a certian directory python code example Example 1: python cd to directory import os os.chdir(path) Example 2: how to change os path in python os.chdir(path)