After using cgi.parse_qs(), how to convert the result (dictionary) back to query string? Looking for something similar to urllib.urlencode().
cgi.parse_qs()
urllib.urlencode()
urllib.parse.urlencode(query, doseq=False, [...])
Convert a mapping object or a sequence of two-element tuples, which may contain str or bytes objects, to a percent-encoded ASCII text string.
— Python 3 urllib.parse docs
urllib.parse
A dict is a mapping.
dict
urllib.urlencode(query[, doseq]) Convert a mapping object or a sequence of two-element tuples to a “percent-encoded” string... a series of key=value pairs separated by '&' characters...
urllib.urlencode
query
doseq
key=value
'&'
— Python 2.7 urllib docs
urllib
1.4m articles
1.4m replys
5 comments
57.0k users