remove _ in names
This commit is contained in:
parent
829db87c40
commit
3af7344581
1270 changed files with 0 additions and 18916 deletions
|
|
@ -1,12 +0,0 @@
|
|||
>>> import urllib.request
|
||||
>>> from collections import defaultdict
|
||||
>>> words = urllib.request.urlopen('http://www.puzzlers.org/pub/wordlists/unixdict.txt').read().split()
|
||||
>>> anagram = defaultdict(list) # map sorted chars to anagrams
|
||||
>>> for word in words:
|
||||
anagram[tuple(sorted(word))].append( word )
|
||||
|
||||
|
||||
>>> count = max(len(ana) for ana in anagram.values())
|
||||
>>> for ana in anagram.values():
|
||||
if len(ana) >= count:
|
||||
print ([x.decode() for x in ana])
|
||||
Loading…
Add table
Add a link
Reference in a new issue