John Coleman wrote: > Blackbird wrote: >> I think this simpler version of letter_hash should work too: >> >> def letter_hash(word): >> w = [c for c in word] >> w.sort() >> return "".join(w)
And, for 2.4 or later: def letter_hash(word): return "".join(sorted(word)) sorted takes an iterable, and strings are iterables. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list