Created
December 27, 2020 03:18
-
-
Save dferrante/dd67e18bb1ac312f3a59b6a5c0307d69 to your computer and use it in GitHub Desktop.
longest words where cutting off a letter one by one is still a word
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [35]: for w in sorted(l, key=lambda x: len(x), reverse=True): | |
...: orig = w | |
...: wl = len(w) | |
...: while len(w) > 2: | |
...: w = w[:-1] | |
...: if w not in d: | |
...: break | |
...: if len(w) == 2: | |
...: print(orig) | |
...: wwl = len(orig) | |
...: if len(orig) < wwl: | |
...: break | |
...: | |
...: | |
ballonets | |
balloters | |
barretter | |
barrettes | |
canalised | |
canalises | |
carolinas | |
carolines | |
champerty | |
collarets | |
composers | |
isthmians | |
machinery | |
marshalls | |
minimised | |
minimiser | |
minimises | |
patentees | |
patenters | |
photomaps | |
quarterns | |
reversers | |
reversist | |
sheathery | |
sheathers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment