Python - Os - Join


To create a path:

import os
path = os.path.join('root-dir', 'parent-dir', 'file.txt')