wargame/pythonchallenge.com
http://www.pythonchallenge.com/pc/def/channel.html
Sanguine
2014. 6. 20. 14:35
import re, zipfile
zip = zipfile.ZipFile("C:\\Users\\sec\\Downloads\\channel.zip")
result = ""
file = "90052"
result = ""
while 1:
text = zip.read(file+".txt")
file = re.findall("Next nothing is (\d+)",text)
#read the next file name
if file :
file = "".join(file)
result+=zip.getinfo(file+".txt").comment
#collect the comments
else :
#if contents are not "Next nothing..."
print result
exit(0)