This prevents one from having to manually change back slash to forward slash, if one decides to work on a project between Linux or Windows based directory systems.
Info here: os.path — Common pathname manipulations — Python 3.11.1 documentation
edit by karolus: use the higher level pathlib instead
E.g. the function
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
# i.e.: dirname = /folder 1 or C:\folder 1
prj_location= os.path.join(dirname, 'Projects')
prj_location returns: /folder 1/Projects or C:\folder 1\Projects, if on windows