I'm trying to convert this list:
a_list = ['c:', 'project_files', 'ProjA', 'B_Files']
into this path:
'c:\\project_files\\ProjA\\B_Files'
I'm using this:
a_list = ['c:', 'project_files', 'ProjA', 'B_Files']
my_path = os.path.join(*a_list)
However this is what I get:
'c:project_files\\ProjA\\B_Files'
Why isn't there a \\ after c: ?
I was reading some similar questions and apparently it has something to do with this not being an absolute path but a relative one, but I'm still unsure how to get what I want
I'd appreciate any advice
This is covered directly on the official documentation. Relevant section: