new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
11
Task/Ordered-words/Python/ordered-words-2.py
Normal file
11
Task/Ordered-words/Python/ordered-words-2.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import urllib.request
|
||||
|
||||
mx, url = 0, 'http://www.puzzlers.org/pub/wordlists/unixdict.txt'
|
||||
|
||||
for word in urllib.request.urlopen(url).read().decode("utf-8").split():
|
||||
lenword = len(word)
|
||||
if lenword >= mx and word==''.join(sorted(word)):
|
||||
if lenword > mx:
|
||||
words, mx = [], lenword
|
||||
words.append(word)
|
||||
print(' '.join(words))
|
||||
Loading…
Add table
Add a link
Reference in a new issue