Created
October 21, 2013 00:49
-
-
Save presci/7077171 to your computer and use it in GitHub Desktop.
python iterate over the map and create key value pairs
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
K={'hello10':'world10', 'hello9':'world9', 'hello1':'world1'} | |
K.keys().sort() | |
Str = '' | |
for i in K.keys(): | |
Str += i + '=' + K[i] + '&' | |
print Str[:-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment