easy way to change a dict data to url Parameter
(1)
a={'b':'bbbb','c':'ccc',....}
(2)
self.redirect('/tribes/view?b=' + a['b'] + '&c=' + a['c'])
so i want to get
b=' + a['b'] + '&c=' + a['c'] ...
from dict a
开发者_JS百科hae any easy way to do this ?
thanks
from urllib import urlencode
urlencode({'b':'bbbb', 'c':'ccc'})
精彩评论