My input is folder_src = 'D:\TEST\BOE\7-13-2'
, I want to add another \ next to \ as folder_src = 'D:\\TEST\\BOE\\7-13-2'
.
How will I be able to do it?

0 Answer
Use replace
:
folder_src = 'D:\\TEST\\BOE\\7-13-2'
output = folder_src.replace('\\', '\\\\')
print(output) # D:\\TEST\\BOE\\7-13-2
这家伙很懒,什么都没留下...