Using the pickle library.
First, we’ll need to download banner.p and install pickle. This starts the string of having to stumble across an expected library and can be extremely frustrating sometimes.
If you want to read banner.p locally:
import os, pickle
raw = open(“banner.p”).read()
Otherwise we can take advantage of the urllib library we used in the previous challenge.
import urllib,pickle url = "http://www.pythonchallenge.com/pc/def/banner.p" obj=pickle.load(urllib.urlopen(url)) for line in obj: print ''.join(map(lambda pair: pair*pair, line))