Skip to content

Instantly share code, notes, and snippets.

@lufeihaidao
Created April 13, 2014 15:39
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/10589089 to your computer and use it in GitHub Desktop.
Save lufeihaidao/10589089 to your computer and use it in GitHub Desktop.
Q7 of python challenge
import re, Image
im = Image.open("oxygen.png")
row = [im.getpixel((x, 47)) for x in range(0, im.size[0], 7)]
chrs = [chr(r) for r, g, b, a in row if r == g == b]
s = ''.join(chrs)
print ''.join(map(chr, map(int, re.findall(r'\d+',s))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment