>>> import urllib.parse
>>> data = {
... "comments[]":"one",
... "comments[]":"two",
... "comments[]":"three"
... }
>>> data
{'comments[]': 'three'}
>>> urllib.parse.urlencode(data)
'comments%5B%5D=three'
>>>
'comments%5B%5D=one&comments%5B%5D=two&comments%5B%5D=three'