|
|
|
|
|
by zephjc
5888 days ago
|
|
Well, do you really want ALL possibilities, or just valid ones (actual words - HZLLO is not a word)? If you want all possibilities, I might suggest wrapping it in a function that can lazily return the possibilities one by one as needed (see the yield keyword). If you want only valid entries, you will probably want something more sophisticated (e.g. a search tree) |
|
$ grep -i ^H.LL.$ /usr/share/dict/words
Maybe a similar method using the re module and then matching on your dictionary?