Chadrick Blog

python encode string to percent encoded(urlencode) format

reference: https://www.urlencoder.io/python/

\>>> import urllib.parse
>>> query = 'Hellö Wörld@Python'
>>> urllib.parse.quote(query)
'Hell%C3%B6%20W%C3%B6rld%40Python'