Python转换 %XX%XX%XX%XX 与 文字 引入依赖 from urllib.parse import quote,unquote 文字 转 %XX%XX%XX%XX text = "丽江" print(quote(text,'utf-8')) %XX%XX%XX%XX 转 文字 str = "%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98" print(unquote(str,'utf-8'))