How to change '\\' to '\'

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Sep 28 02:02:50 EDT 2018


Jach Fong wrote:
> I get a string item, for example path[0], from path = os.get_exec_path()
> It's something like "\\Borland\\Bcc55\\Include"

It doesn't actually have double backslashes in it, that's just a
result of how the string is being displayed. No conversion is
needed.

-- 
Greg



More information about the Python-list mailing list