I am trying to convert a Python dictionary to a string for use as URL parameters. I am sure that there is a better, more Pythonic way of doing this. What is it?
x = ""
for key, val in {'a':'A', 'b':'B'}.items():
x += "%s=%s&" %(key,val)
x = x[:-1]