from urllib import parsejsRet = 'roleO%2f'print(parse.unquote(jsRet))print(parse.quote(jsRet))输出: roleO/ roleO%252f