The Python Challenge – 5

A bit annoyed about this one.  The Peak Hell clue was completely lost on me and in searching I came across another blog that had all the solutions.  I got sucked in and saw what the end game was.  I guess I would have worked it out pretty quickly anyway.

The banner.p name gave it away too I guess. Serialization the python way was easy  enough.

2.7 Solution

#pickle?
import pickle
data = pickle.load( open( "banner.p", "rb" ) )

mycount = 0

for line in data:
myline = ""
for item in line:
counter = 0
mycount = int(item[1])
while counter myline += item[0]
counter += 1
print myline

3.2.3 Solution 

#pickle?
import pickle
data = pickle.load( open( "banner.p", "rb" ) )

mycount = 0

for line in data:
myline = ""
for item in line:
counter = 0
mycount = int(item[1])
while counter myline += item[0]
counter += 1
print (myline)