Python urllib.parse.quote() Function
The urllib.parse.quote() function replaces special characters in a string using the %xx escape.
Syntax
urllib.parse.quote(string, safe='/')
Return Value
A URL-encoded string.
Example
Output
Click Run to execute your code