#!/usr/bin/env/python #coding:utf8 ''' Created on May 2, 2013 @author: killua @url: http://www.pythonchallenge.com/pc/def/equality.html @target: http://www.pythonchallenge.com/pc/def/linkedlist.html '''
import urllib import re
defnext_page(nothing_no): try: text = urllib.urlopen('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%s' % nothing_no).read() print text m = re.match(r'[^\d]*(\d+)$', text) return m.groups()[0] except: return'END'