http://www.pythonchallenge.com/pc/def/peak.html
<html> <head> <title>peak hell</title> <link rel="stylesheet" type="text/css" href="../style.css"> </head> <body> <center> <img src="peakhell.jpg"/> <br><font color="#c0c0ff"> pronounce it <br> <peakhell src="banner.p"/> </body> </html> <!-- peak hell sounds familiar ? -->
有文件 banner.p,应该用pickle来读取文件内容。
import pickle from pprint import pprint if __name__ == "__main__": f = open("banner.p"); banner = pickle.load(f) for i in banner: line = "" for j in i: line += j[0]*j[1] print line #for line in banner: # print "".join(map(lambda pair: pair[0]*pair[1], line))
##### #####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
### #### ### ### ##### ### ##### ### ### ####
### ## #### ####### ## ### #### ####### #### ####### ### ### ####
### ### ##### #### ### #### ##### #### ##### #### ### ### ####
### #### #### ### ### #### #### #### #### ### #### ####
### #### #### ### #### #### #### #### ### ### ####
#### #### #### ## ### #### #### #### #### #### ### ####
#### #### #### ########## #### #### #### #### ############## ####
#### #### #### ### #### #### #### #### #### #### ####
#### #### #### #### ### #### #### #### #### #### ####
### #### #### #### ### #### #### #### #### ### ####
### ## #### #### ### #### #### #### #### #### ### ## ####
### ## #### #### ########### #### #### #### #### ### ## ####
### ###### ##### ## #### ###### ########### ##### ### ######