|
|
|
|
|
by father_of_two
4080 days ago
|
|
Here's a variant of the last solution the author presented, using a Counter of each word, instead a sorted list of words' chars, as normalization. cnt=Counter(tuple(Counter(w).iteritems()) for w in words)
print [w for w in words if cnt[tuple(Counter(w).iteritems())] > 1]
This is just code golfing, I don't even think it's clear. The last solution of the author is nice, though. |
|