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)
'wargame > pythonchallenge.com' 카테고리의 다른 글
http://www.pythonchallenge.com/pc/def/oxygen.html (0) | 2014.06.20 |
---|---|
http://www.pythonchallenge.com/pc/def/peak.html (0) | 2014.06.20 |
http://www.pythonchallenge.com/pc/def/linkedlist.php (0) | 2014.06.03 |
http://www.pythonchallenge.com/pc/def/equality.html (0) | 2014.06.03 |
http://www.pythonchallenge.com/pc/def/ocr.html (0) | 2014.06.03 |