- alphabet = list(string.ascii_lowercase)
- random.shuffle(alphabet)
- alphabet = ''.join(alphabet)
- worker_args.append((ciphertext, alphabet, max_iterations, fitness))
+ if alphabet:
+ this_alphabet = alphabet
+ else:
+ this_alphabet = list(string.ascii_lowercase)
+ random.shuffle(this_alphabet)
+ this_alphabet = ''.join(this_alphabet)
+ worker_args.append((ciphertext, this_alphabet, max_iterations, fitness))