Skip to content

Instantly share code, notes, and snippets.

@EntityReborn
Created November 2, 2011 00:11
Show Gist options
  • Save EntityReborn/1332354 to your computer and use it in GitHub Desktop.
Save EntityReborn/1332354 to your computer and use it in GitHub Desktop.
text = "abcdefgh"
split = 2
print "Original: %s" % text
def encode(text, split):
textout = ""
for x in xrange(0, split):
textout += text[x::split]
return textout[::-1]
code = encode(text, split)
print "Encoded: %s" % code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment