Python程序设计基础——代码习题 import osos.getcwd()# 获取当前路径os.chdir(r'c:\\') # 修改工作目录到C盘os.chdir(r'd:\\Python\\demo') # 恢复到原来的目录。