<s> def anagrams ( w ) : <EOL> """<STR_LIT>""" <EOL> w = list ( set ( w ) ) <EOL> d = { } <EOL> for i in range ( len ( w ) ) : <EOL> s = '<STR_LIT>' . join ( sorted ( w [ i ] ) ) <EOL> if s in d : <EOL> d [ s ] . append ( i ) <EOL> else : <EOL> d [ s ] = [ i ] <EOL> reponse = [ ] <EOL> for s in d : <EOL> if len ( d [ s ] ) > <NUM_LIT:1> : <EOL> reponse . append ( [ w [ i ] for i in d [ s ] ] ) <EOL> return reponse </s>
