Human: URL encoding in python Assistant: 
Here is some code to replace special characters in utf-8 encoded string `s` using the %xx escape

urllib.parse.quote(s.encode('utf-8'))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.