| 
        
         Brett / 
          PythonChallenge4(:source lang=python:) 
 import urllib2 import re def follow(nothing):     result = urllib2.urlopen('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%s' % (nothing)).read()
    print result
    new = re.findall('and the next nothing is ([0-9]*)', result)
    return new[0]
if __name__ == "__main__": 
     nothing = '8022'
    while True:
        nothing = follow(nothing)
(:sourceend:)  |