Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Python

Cách biết current working directory trong Python?


Để biết thư mục làm việc hiện tại (pwd) dùng module os.

Ví dụ

>>> import os
>>> print(os.getcwd())
/home/ayush/qna