Skip to content

Instantly share code, notes, and snippets.

@presci
Created October 21, 2013 00:49
Show Gist options
  • Save presci/7077171 to your computer and use it in GitHub Desktop.
Save presci/7077171 to your computer and use it in GitHub Desktop.
python iterate over the map and create key value pairs
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