0
Follow
2
View

How to add one more \ next to \

dsunzhaogong 注册会员
2023-01-24 23:57

Use replace:

folder_src = 'D:\\TEST\\BOE\\7-13-2'
output = folder_src.replace('\\', '\\\\')
print(output)  # D:\\TEST\\BOE\\7-13-2

About the Author

Question Info

Publish Time
2023-01-24 23:57
Update Time
2023-01-24 23:57