Python os.getcwd()方法 os.getcwd() 方法用于返回当前工作目录。 语法 os.getcwd() 参数 无 返回值 返回当前的工作目录 实例 import os cwd = os.getcwd()