Kent Johnson wrote: > BTW thinking of writing this as a loop brings to mind some problems - > what will your program do with 'words' such as 555-1212 or "Ha!" ?
Hmm, on reflection I don't thing "Ha!" will be a problem, but a 'word' with no letters will cause an IndexError. Your test for 4 letters is really misplaced. What you want to find is words that have only two letters to scramble. I would put a test right where you call random.shuffle() to see if tempWord is longer than 2. In fact you might put the whole test and shuffle bit in a separate function. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor