str1 = 'c:\documents and settings\user\desktop'
str2 = 'starcraft.exe'
print str1
I would like to know how it would be possible to add str2 to the end of str1 with a "\" inbetween the two strings. so that I end up with "c:\documents and settings\user\desktop\starcraft.exe".
Thanks
one method i always use is the os.path.join() method.
dir = os.path.join("C:\\","documents and settings","user","desktop")
starcraftpath = os.path.join(dir,"starcraft.exe")
takes care of the slashes for you.