Skip to content

Instantly share code, notes, and snippets.

@lufeihaidao
Created April 13, 2014 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lufeihaidao/10588543 to your computer and use it in GitHub Desktop.
Save lufeihaidao/10588543 to your computer and use it in GitHub Desktop.
Q5 of python challenge
# 推荐的做法
import urllib2, sys, pickle
pickle_data = urllib2.urlopen('http://www.pythonchallenge.com/pc/def/banner.p').read()
data = pickle.loads(pickle_data)
for line in data:
for char, count in line: sys.stdout.write(char * count)
sys.stdout.write("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment