from os import path path.abspath("my_path")
from pathlib import Path relative = Path("my_path") absolute = relative.asolute()