code: def _unquote(string):
      
      result = string.split('%')
      for i, item in enumerate(result[1:]):
          i += 1
          try:
              result[i] = _HEXTOCHR[item[:2]] + item[2:]
          except KeyError:
              result[i] = '%' + item
          except UnicodeDecodeError:
              result[i] = chr(int(item[:2], 16)) + item[2:]
      return ''.join(result)
docs: _unquote('abc%20def') -> 'abc def'.