code:
import urllib,urllib2
url = 'http://www.pythonchallenge.com/pc/def/linkedlist.php'
print urllib2.urlopen(url).read()
print urllib2.urlopen(url,urllib.urlencode({'nothing':12345})).read()
the question I encounter is why the two ‘print’ output the same content,
where is problem in my code?
The second argument to urlopen is data to be POSTed. If you want URL arguments you need to create the URL: