📜  更改我的 python 工作目录 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:14.104000             🧑  作者: Mango

代码示例1
# Import the os module
import os

# Print the current working directory
print("Current working directory: {0}".format(os.getcwd()))

# Change the current working directory
os.chdir('/tmp')

# Print the current working directory
print("Current working directory: {0}".format(os.getcwd()))