i am trying to get a user input and use that input as part of a directory path. i have tried many way of doing this but cant get rid of the space.
My output looks like this
C:\Fahad\ACC\Ou tput\ test.txt
notice the white space before test.txt. I want it to look like this
C:\Fahad\ACC\Ou tput\test.txt
I have tried the replace method as shown and a couple other methods i found online but the annoying white space wont go away.
any help would be greatly appreciated
Code:
accfile1 = raw_input("Enter file name:")
print "C:\Fahad\ACC\Output\ ".replace(' ', ''),accfile1
C:\Fahad\ACC\Ou tput\ test.txt
notice the white space before test.txt. I want it to look like this
C:\Fahad\ACC\Ou tput\test.txt
I have tried the replace method as shown and a couple other methods i found online but the annoying white space wont go away.
any help would be greatly appreciated
Comment