They are same, but which one should I use?
http://docs.python.org/library/os.html:
os.sep The character used by t
os.sep
The character used by t
I recommend you use os.path.sep for clarity, since it's a path separator, not an OS separator. If you import os.path as path you can call it path.sep, which is even better.
os.path.sep
import os.path as path
path.sep