python challenge 12
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #-*- coding:utf8-*-
2 import time
3 start = time.time()
4
5 # Get the data from: http://www.pythonchallenge.com/pc/return/evil2.gfx
6
7 h = open("evil2.gfx", "rb")
8 data = h.read()
9 h.close()
10
11 new_data = [[], [], [], [], []]
12 n = 0
13
14 for byte in range(len(data) - 1):
15 new_data[n].append(data[byte])
16 n = 0 if n == 4 else n + 1
17
18 for n, elt in enumerate(new_data):
19 h = open(str(n + 1), "wb")
20 h.write("".join(elt))
21 h.close()
22
23 print "耗时:"+str(time.time() - start)