Use rstrip to strip the specified character(s) from the right side of the string.
my_string = my_string.rstrip('\\')
See: http://docs.python.org/library/stdtypes.html#str.rstrip
Use rstrip to strip the specified character(s) from the right side of the string.
my_string = my_string.rstrip('\\')
See: http://docs.python.org/library/stdtypes.html#str.rstrip