I'm attempting to join a tuple of two strings using the .join method as follows.
>>> my_tuple = ("parent", "child")
>>> "\\".join(my_tuple)
I would expect this to return parent\child
, however, it returns parent\\child
.
Why is this? Escaping the backslash with another backslash works fine if I attempt to simply print it.
>>> print "parent\\child"
>>> parent\child
Observed in Python 2.7.3 on Windows 7.