Last active
October 20, 2017 18:31
-
-
Save nhuntwalker/8b97a30fc9ba062b95327dfc1df29be4 to your computer and use it in GitHub Desktop.
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
Write a function that will take a query string as an argument and return the key-value pairs as a dictionary. | |
query = ?one=1&two=2 | |
parameters(query) => {'one': '1', 'two': '2'} | |
query = ?foods=butter&foods=cake&foods=chicken | |
parameters(query) => {'foods': ['butter', 'cake', 'chicken']} | |
query = ?username=codefellows&password=learnmorefaster&courses=code201&courses=code301&courses=code401-python&courses=code401-javascript&courses=code401-dotnet | |
parameters(query) => | |
{ | |
'username': 'codefellows', | |
'password': 'learnmorefaster', | |
'courses': ['code201', 'code301', 'code401-python', 'code401-javascript', 'code401-dotnet'] | |
} | |
Submit link to this file to nicholas@codefellows.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment