what if i was trying to use the string as a path name. is it even possible to store a pathname as a string. for example if i wanted to assign C:\fahad\test.txt as a string and then call on it.
an overall picture of what i am trying to do is ask the user for a file name at which the user will enter for example "test.txt" . it may not be .txt everytime could be other file names whatever the user enters.
now i want to use what the user entered as part of the pathname and store the entire pathname in one variable.
- accfile = raw_input("Enter file name: ")
-
path = str("C:\Fahad\ACC\Output\\"), accfile
-
print path
so if the user enters test.txt as the raw input
the output is coming out as: ('C:\\Fahad\\ACC\\Output\\', 'test.txt')
instead i need it to come out clean as "C:\Fahad\ACC\Output\test.txt"
it looks like whats after the comma is being considered as separate string wheras i want it to be part of the original string.