如何在 Python 中获取当前目录
在 Python 中获取当前目录有两种主要方法:
1. 使用 os.getcwd()
import os current_dir = os.getcwd() print(current_dir)
如何在 Python 中获取当前目录
在 Python 中获取当前目录有两种主要方法:
1. 使用 os.getcwd()
import os current_dir = os.getcwd() print(current_dir)
之前
