about urllib.encode & urlopen(url,data,timeout) function

the data argument is form like belows:

a=1&b=2

this character is use urllib.urlencode concat together

use a dict

e.g.

dict={}

dict["a"]=1

dict["b"]=2

data=urllib.urlencode(dict)

 

if you already has a form like a=1&b=2

then your did not use the urllib.urlcode function

i was made a mistake when google some blog same how to use urllib2.urlopen() follow the urllib.urlencode way

in fact my data is alreay the well format

你可能感兴趣的:(function)