cd is the shell command to change the working directory.
cd
How do I change the current working directory in Python?
os.chdir() is the right way.
os.chdir()