I have several scripts that take as input a directory name, and my program creates files in those directories. Sometimes I want to take the basename of a directory given to the
to build the paths without writing slashes it is better to use:
os.path.join(dir, subdir, file)
if you want to add separators or get the separator independly of the os, then use
os.sep