Exact answer for your question is os.chdir('../')
Use case:
Folder1:
sub-folder1:(you want to navigate here)
Folder2:
sub-folde2:(you are here)
To navigate to sub-folder1
from sub-folder2
, you need to write like this
"../Folder1/sub-folder1/
"
then, put it in os.chdir("../Folder1/sub-folder1/")
.