0

I have the following line to parse URL parameters:

url="?firstParam=First&secondParam="
params=parse_qs(urlparse(url).query, keep_blank_values=True)

The result is a dictionary with the following values:

{'firstParam': ['First'], 'secondParam': ['']}

As I understand, dictionary values are Lists in this case. Is there a way I could call parse_qs to store them as strings?

mythic
  • 895
  • 2
  • 13
  • 31
  • 1
    Is there anything you're asking that [this question](http://stackoverflow.com/questions/1024143/how-to-stop-python-parse-qs-from-parsing-single-values-into-lists) doesn't already cover? – DSM Apr 23 '16 at 16:26
  • I think that clears things up. Thanks for the link. Sorry for the duplicate. – mythic Apr 23 '16 at 16:32

0 Answers0