both url and file path joins use slashes as dividers between their parts for example pathtodir file pathtodirfile pathtodir file pathtodirfile http algorithms com part http algorithms compart http algorithms com part http algorithmspart remove trailing remove leading remove trailing remove leading
import os

def join_with_slash(base, suffix):
    
    base = base.rstrip('/')
    
    suffix = suffix.lstrip('/').rstrip()
    full_path = "{}/{}".format(base, suffix)
    return full_path