cd is the shell command to change the working directory.
cd
How do I change the current working directory in Python?
If You would like to perform something like "cd.." option, just type:
os.chdir("..")
it is the same as in Windows cmd: cd.. Of course import os is neccessary (e.g type it as 1st line of your code)