Created
May 20, 2016 00:13
-
-
Save maikwoehl/e26b264793a596ba18da739856089ec2 to your computer and use it in GitHub Desktop.
Quick Serializing of GET Query String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Serializes a GET query string | |
# Input: key1=value1&key2=value2 | |
# Output: { 'key1': 'value1', 'key2': 'value2' } | |
def serializeQueryString(query_string): | |
query = query_string.split("&") | |
params = {} | |
for item in params: | |
params[item.split("=")[0]] = item.split("=")[1] | |
return params |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment