import os
dir_name = "new_dir"
os.mkdir(dir_name)
os.chdir(dir_name)
print("THE cwd now is in " + os.getcwd())
os.rmdir("../"+dir_name)
print(dir_name+" deleted")
print("Checking CWD")
print("THE script now is in " + os.getcwd())
getcwd 返回错误而不是检查当前工作目录,有人可以指出我作为文档的原因,或者只是告诉我为什么