RosettaCodeData/Task/Ordered_words/Python/ordered_words-3.py
Ingy döt Net 1e05ecd7ee First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
2013-04-08 13:02:41 -07:00

3 lines
178 B
Python

from itertools import groupby
o = (w for w in map(str.strip, open("unixdict.txt")) if sorted(w)==list(w))
print list(next(groupby(sorted(o, key=len, reverse=True), key=len))[1])