【Python】os.getcwd()
2023-06-02 本文已影响0人
盐果儿
os.getcwd():获取当前工作路径(get current working directory)
import os
current_dir = os.getcwd()
print(current_dir)
# Output: /path/to/current/directory
os.getcwd():获取当前工作路径(get current working directory)
import os
current_dir = os.getcwd()
print(current_dir)
# Output: /path/to/current/directory