George Sakkis wrote: > while True: > random.shuffle(letters) > trans_letters = ''.join(letters)[:len(original_set)] > if some_compatison(original_set,trans_letters): > trans_table = string.maketrans(original_set, trans_letters) > break
Thanks, that looks pretty good. Although I have to say, a do/while structure is the much more obvious way. I wonder why it hasn't been added to the language. -- http://mail.python.org/mailman/listinfo/python-list