📌  相关文章
📜  在 Python 代码示例中更改当前工作目录

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

代码示例3
# 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('/Projects')

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