code: def remove_backslashes(path):
      
      if os.name == 'nt':
          # Removing trailing single backslash
          if path.endswith('\\') and not path.endswith('\\\\'):
              path = path[:-1]
          # Replacing backslashes by slashes
          path = path.replace('\\', '/')
          path = path.replace('/\'', '\\\'')
      return path
docs: Remove backslashes in *path*
  
      For Windows platforms only.
      Returns the path unchanged on other platforms.
  
      This is especially useful when formatting path strings on
      Windows platforms for which folder paths may contain backslashes
      and provoke unicode decoding errors in Python 3 (or in Python 2
      when future 'unicode_literals' symbol has been imported).