MRAB <
python@mrabarnett.plus.com> writes:
|When I build a path, I use os.path.join, so it's only a problem if one
|of the strings refers to the root of a drive, e.g. "C:\\".
Or, one also might use "pathlib".
main.py
import pathlib
path = pathlib.Path( 'example' ).joinpath( 'note' ).with_suffix( '.txt' ) print( path )
output
example\note.txt
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)