Follow the URL chain to get the result (the chain may contain over 300 URLs......)
谜题详细描述:http://www.pythonchallenge.com/pc/def/linkedlist.php
Python解决方案:
import urllib
nothing = "12345"
ii = 1
while ii<401:
source = urllib.urlopen("http://www.pythonchallenge.com"
+ "/pc/def/linkedlist.php?nothing="+nothing).read()
nothing=filter(str.isdigit, source)
print nothing
if source != "and the next nothing is " + nothing:
print "source is not: and the next nothing is " + nothing
print "source is: " + source
nothing = raw_input("select which number?")
print "you set " + nothing + " as nothing"
ii+=1
版权所有 罗明