It's just the method. You're not missing anything. The official documentation shows that you can use list unpacking to supply several paths:
s = "c:/,home,foo,bar,some.txt".split(",")
os.path.join(*s)
Note the *s
intead of just s
in os.path.join(*s)
. Using the asterisk will trigger the unpacking of the list, which means that each list argument will be supplied to the function as a separate argument.