Created
May 18, 2015 00:16
-
-
Save anonymous/7f44a9c990e95f5bfd06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151 out = "" | |
152 shift = 0 | |
153 for j in xrange(0,len(ans),4): | |
154 try: | |
155 i = j | |
156 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)] | |
157 shift += inputs.index(ans[i])+1 | |
158 i = j+1 | |
159 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)] | |
160 shift += inputs.index(ans[i])+1 | |
161 i = j+3 | |
162 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)] | |
163 shift += inputs.index(ans[i])+1 | |
164 i = j+2 | |
165 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)] | |
166 shift += inputs.index(ans[i])+1 | |
167 except: | |
168 pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment