"Kam-Hung Soh" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| On Thu, 08 May 2008 15:42:07 +1000, dave <[EMAIL PROTECTED]>
| wrote:
| Your code is always going to return the same list because every word is 
an
| anagram of itself.
|
| Tip: Create a list for each dictionary key, then add a word to the list 
if
| that word is not in the list.  So:
|
| mapdic('adem') --> ["edam", "made"]

Unless you plan to keep the list in alphabetical order, a set might be 
slightly better.



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to