Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Join Strings In Python To Make A Path

This is the basic way to join strings into a file or directory path in python :

python
import os.path

joined_path = os.path.join('a', 'b', 'c')

print(joined_path)
results full
python
import os.path
from pathlib import Path

joined_path = os.path.join(Path.home(), 'a', 'b', 'c')

print(joined_path)
results full

Mushing directories together to make a Python path