Python urllib.parse.urlencode() Function
The urllib.parse.urlencode() function converts a dictionary or sequence of two-element tuples into a URL-encoded query string.
Syntax
urllib.parse.urlencode(query)
Return Value
A URL-encoded string.
Example
Output
Click Run to execute your code