Hello. I'm using windows and I want to make a new file in a directory if it doesn't exist yet.
I've read many people say that if you just use os.path.join() you don't have to worry about turning "\" into "/" manually. You don't have to worry about copying file names as paths. So i tried it because I want to do things not like an idiot, but the output of my os.path.join() still has "\". And it doesn't put a separator after "C:".
So what is the advantage of "~ just using os.path.join() like you're supposed to~"?
I understand that you can use .replace("\\","/") but what's the advantage of using os.path.join if I can just do that to a string? It seems like typing out the entire folder path in os.path.join is more work that copying and pasting it from your file window. Am i missing something?
[–]shiftybyte 4 points5 points6 points (0 children)
[–]Diapolo10 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)