How to change '\\' to '\'

Jach Fong jfong at ms4.hinet.net
Thu Sep 27 23:49:43 EDT 2018


I get a string item, for example path[0], from path = os.get_exec_path()
It's something like "\\Borland\\Bcc55\\Include", a Python string.
I want to use this "string" in a subprocess command as a parameter.
Obviously this command can only recognize "\Borland\Bcc55\Include".
I know there must have an easy way to convert it, but just can't figure
it out:-(

--Jach







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus




More information about the Python-list mailing list