pfile = open('banner.p')
data = pickle.load(pfile) for row in data: for item in row: for index in range(item[1]):
sys.stdout.write(item[0]) print''
pfile.close()
]]>緙栫▼璋滈-4http://www.aygfsteel.com/Andyluo/archive/2008/05/09/pythonPuzzle4.html緗楁槑緗楁槑Fri, 09 May 2008 06:32:00 GMThttp://www.aygfsteel.com/Andyluo/archive/2008/05/09/pythonPuzzle4.htmlhttp://www.aygfsteel.com/Andyluo/comments/199490.htmlhttp://www.aygfsteel.com/Andyluo/archive/2008/05/09/pythonPuzzle4.html#Feedback0http://www.aygfsteel.com/Andyluo/comments/commentRss/199490.htmlhttp://www.aygfsteel.com/Andyluo/services/trackbacks/199490.html
璋滈璇︾粏鎻忚堪錛歨ttp://www.pythonchallenge.com/pc/def/linkedlist.php
Python瑙e喅鏂規(guī)錛?br />
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