python - Find the current directory and file's directory - Stack Overflow

PHOTO EMBED

Sat May 21 2022 13:10:18 GMT+0000 (Coordinated Universal Time)

Saved by @vigneshprince #python

import os 
dir_path = os.path.dirname(os.path.realpath(__file__))
content_copyCOPY

https://stackoverflow.com/questions/5137497/find-the-current-directory-and-files-directory