os.path module to build a path string from a directory name and a filename code example
Example: python path from string
from pathlib import Path
str_path = "my_path"
path = Path(str_path)
from pathlib import Path
str_path = "my_path"
path = Path(str_path)