I am attempting a cipher script where each encoded character could be one of multiple letters, ex: BC = a w k. the encoding part of the script was simple, however i'm running into a problem while trying to decode sentences. because each encoded character looks like BC i have to split the entire string into 2's, then I have to check the key file to see which letters are possible from each character, so could look like TVVQBTTV and the lists would look like:
['G', 'H', 'P', 'R', 'T', 'Y']
['G', 'H', 'P', 'R', 'T', 'Y', 'E', 'L', 'Z', '.']
['G', 'H', 'P', 'R', 'T', 'Y', 'E', 'L', 'Z', '.', 'A', 'F', 'M', 'O', 'S', 'W', 'Z']
['G', 'H', 'P', 'R', 'T', 'Y', 'E', 'L', 'Z', '.', 'A', 'F', 'M', 'O', 'S', 'W', 'Z', 'G', 'H', 'P', 'R', 'T', 'Y']
my goal is to print out every possible combination (ex: GGGG, GGGH, GGGP, ect) in the console so the person receiving the message has to look through all of the combinations to find the right one. this is an attempt to make the cipher harder to break. however, because the amount of lists grow with the amount of characters in the sentence, so 'Hello, how are you?' could look like: TVVQVQVQBTVPBWVOBTTBTVVQDDVOBW and there are to many lists for it to put in this box without it looking thoroughly messy. so is there any way to do this?