from urllib.parse import quote,unquote d = {'lang':'python','type':'testing','ccountry':quote('中國')} print(d) #執行結果:{'lang': 'python', 'type': 'testing', 'ccountry': '%E4%B8%AD%E5%9B%BD'} print(unquote('%E4%B8%AD%E5%9B%BD')) #執行結果:中國
from urllib.parse import quote,unquote d = {'lang':'python','type':'testing','ccountry':quote('中國')} print(d) #執行結果:{'lang': 'python', 'type': 'testing', 'ccountry': '%E4%B8%AD%E5%9B%BD'} print(unquote('%E4%B8%AD%E5%9B%BD')) #執行結果:中國
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。