home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Join Strings In Python To Make A Path

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

March 2022
Code
import os.path

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

print(joined_path)
[TODO: Result]
Code
import os.path
from pathlib import Path

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

print(joined_path)
[TODO: Result]
═══ § ═══