Last active
January 6, 2026 14:02
-
-
Save pythonhacker/db03e8fe3e6d90a91522cc0e23d8e949 to your computer and use it in GitHub Desktop.
Demo of the search_word program with bisect module
This file contains hidden or 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
| >>> filename='/usr/share/dict/words' | |
| >>> bt.search_word(filename, 'calculate') | |
| ['calculate', 'calculated', 'calculates'] | |
| >>> bt.search_word(filename, 'code') | |
| ['code', "code's", 'coded', 'codeine', "codeine's", 'codependency', "codependency's", 'codependent', | |
| "codependent's", 'codependents', 'codes', 'codex', "codex's"] | |
| >>> bt.search_word(filename, 'search') | |
| ['search', "search's", 'searched', 'searcher', "searcher's", 'searchers', 'searches', 'searching', | |
| 'searchingly', 'searchlight', "searchlight's", 'searchlights'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment