Get current working directory

import pathlib
pathlib.Path().resolve()

Know more: