Skip to content

Instantly share code, notes, and snippets.

@gaving
Created February 10, 2010 21:58
Show Gist options
  • Save gaving/300898 to your computer and use it in GitHub Desktop.
Save gaving/300898 to your computer and use it in GitHub Desktop.
reduce( lambda x, y: x + y, [ reduce( lambda x, y: x + y, [ ( j + 1 ) * ( ord( i ) - 64 ) for i in x[ j ] ] ) for j in xrange( len( x ) ) ] )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment