Simple Script to Combine/Seperate Lines of Text

Sean Ross sross at connectmail.carleton.ca
Sun Jun 8 22:52:16 EDT 2003


Could you describe the algorithm involved in going from

> airncjrlfojqmxirnxplvmndrhqndj ... e (length n) combined with
>
> qpmgktincirzpwncjftewnchdtecru ... f (length n)

to

> motnciqaxhfyeklpgmchqicngiehfc ... a (length n)


is there a mapping that takes 'a' and 'q' and produces 'm'? like, perhaps,
    a==1, q==17
so
    a+q == 1 + 17 == 18 ?

but that would be 'r', so maybe
     (1+17) - 5 == 13 == m
is the formula.
But that doesn't work for the next characters in the string ('i' and 'p'):
    i==9, p==16,
    (i+p) - 5 == 20 == 't' != 'o' == 15

in other words, the reason escapes me as to why the two strings combined
produce the third string you suggest.
If you could describe how you go from one to the other then I'd like to try
to help with the programming details
of implementing your solution.






More information about the Python-list mailing list