Created
August 31, 2013 04:43
-
-
Save ferristseng/6396255 to your computer and use it in GitHub Desktop.
transform a dictionary of url parameters into a string
This file contains hidden or 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
| def parse_options(opts): | |
| if opts: | |
| return '?%s' % '&'.join(['%s=%s' % (k, v) for (k, v) in opts.iteritems()]) | |
| return '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment