[解决方案] pythonchallenge level 6
查看页面代码,知道找zip
www.pythonchallenge.com/pc/def/channel.zip,查看zip下的readme.txt知道从90052,跑一遍知道要收集zip的comment
zf = zipfile.ZipFile("/tmp/channel.zip")
number = '90052'
length = len(zf.infolist())
ret = []
for i in length:
text = zf.read(num+'.txt')
num = re.findall('\d{2,}',text)[0]
ret.append(zf.getinfo(num+'.txt').comment)
temp = ''
for i in ret:
if i == '\n':
print temp
temp=''
else:
temp+=i
***************************************************************
****************************************************************
** **
** OO OO XX YYYY GG GG EEEEEE NN NN **
** OO OO XXXXXX YYYYYY GG GG EEEEEE NN NN **
** OO OO XXX XXX YYY YY GG GG EE NN NN **
** OOOOOOOO XX XX YY GGG EEEEE NNNN **
** OOOOOOOO XX XX YY GGG EEEEE NN **
** OO OO XXX XXX YYY YY GG GG EE NN **
** OO OO XXXXXX YYYYYY GG GG EEEEEE NN **
** OO OO XX YYYY GG GG EEEEEE NN **
** **
****************************************************************
**************************************************************