Re:Things I Learned from a Job Hunt for a Senior Engineering...
by nomel on Tuesday April 24, 2018 @03:33PM
(#16915830)
You would have to make sure the sum of any combination of all characters was unique. For example, if the code was the character number, a=1, b=2, etc, both "abc" and "bbb" would have the same sum.
So I think something silly like:
character_code = len(string)*len(alphabet)^character_index
should work.
So I think something silly like: character_code = len(string)*len(alphabet)^character_index should work.