0
I have a path but it is incomplete and i want To complete it ny adding some words
I have a path but it is incomplete and i want To complete it ny adding some words A='C:\user\dell' B='\desktop' C=A+B print(C) But it don't work
3 Respuestas
+ 5
If you want to use backslash it has to be done in this way. And it's not a matter of single or double quotes, both works.
A="C:\\user\\dell"
B="\\desktop"
print(A+B)
# output: C:\user\dell\desktop
A='C:\\user\\dell'
B='\\desktop'
print(A+B)
#output: C:\user\dell\desktop
+ 2
Lothar. @netclix
Thank you for your help
I have found another way
A=r'C:\user\.....'