How to change '\\' to '\'
On Sun, 30 Sep 2018 17:45:52 -0700, Rick Johnson wrote:
> Jach Fong wrote:
>> I get a string item, for example path, from 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 :-(
> I would suggest substituting all backslashes with forward slashes, that
> way, the printed version and the internal escaped version won't be
> confusing to you. And besides, which is easier to read?
> Or this?
Practicality Beats Purity