Skip to content

Instantly share code, notes, and snippets.

@zsimic
Created November 13, 2011 19:25
Show Gist options
  • Select an option

  • Save zsimic/1362537 to your computer and use it in GitHub Desktop.

Select an option

Save zsimic/1362537 to your computer and use it in GitHub Desktop.
obfuscated python hack writing 'python'
def m(x): return -1 if x%3 else 1
def g(x): return cmp(2.5-x, 0)
print ''.join(chr(ord('a') + x)
for x in reduce(
lambda x,y: x+[x[-1]+y*m(len(x)-1)] if isinstance(x,list) else [x,x+y],
reduce(
lambda x,y: x+[x[-1]+g(y-2)*(y-2+cmp(g(y-2)+m(y-1),0)*cmp(6-y,0))+(8-y)*m(y-1)] if x else [15],
range(7)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment