In Python, how do I specify directory separator in os.path.join() function?
<p>I tried the code as below, attempting to change directory separator to forward slash <code>/</code> but still stuck in the backslash <code>\</code>. The documentation says the function joins paths using directory separator <code>os.sep</code>, but this didn't work in my case.</p>

<pre><code>import os
os.sep = '/'
print(os.sep)
print(os.path.join('.', 'path'))
</code></pre>