File tree Expand file tree Collapse file tree 3 files changed +21
-917
lines changed Expand file tree Collapse file tree 3 files changed +21
-917
lines changed Original file line number Diff line number Diff line change 1+ import zipfile
2+
3+ z = zipfile .ZipFile ("channel/channel.zip" , "r" )
4+ b = b""
5+
6+
17def read_next (file_name ):
8+ global z
9+ global b
10+ b += z .getinfo ("{}.txt" .format (file_name )).comment
211 f = open ("channel/channel/{}.txt" .format (file_name ), "r" )
312 lines = f .readlines ()
413 for i in range (len (lines )):
514 s = lines [i ]
6- print (s )
715 ary = s .split ()
816 result = ary [- 1 ]
917 if result .isdigit ():
1018 read_next (result )
1119 else :
1220 pass
1321
14-
15- read_next ( 90052 )
22+ read_next ( 90052 )
23+ print ( b . decode () )
Original file line number Diff line number Diff line change 11# pythonchallenge
22Solve Problems in http://www.pythonchallenge.com
33
4+ ##### 6
5+ result: http://www.pythonchallenge.com/pc/def/oxygen.html
6+ ```
7+ import zip
8+ ```
9+ zip file not only can bi unzip, can contains a lot of comments.
10+
11+
412#### 5
5- http://www.pythonchallenge.com/pc/def/channel.html
13+ result: http://www.pythonchallenge.com/pc/def/channel.html
614```
715import pickle
816```
917every line elements add up to 96
1018
1119#### 4
12- http://www.pythonchallenge.com/pc/def/peak.html
20+ result: http://www.pythonchallenge.com/pc/def/peak.html
1321
1422```
1523import requests
You can’t perform that action at this time.
0 commit comments