【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

上一篇 下一篇

猜你喜欢

热点阅读