Re:A (deceptively tricky?) Python question
by retrogradeorbit on Wednesday May 05, 2010 @02:08AM
(#1320468)
Yes, if you wanted to only have valid words, this could reduce the search space dramatically. I know it's not python, but if you replaced the '_'s with '.'s just the grep command will be surprisingly quick and powerful.
$ grep -i ^H.LL.$ /usr/share/dict/words
Maybe a similar method using the re module and then matching on your dictionary?
$ grep -i ^H.LL.$ /usr/share/dict/words
Maybe a similar method using the re module and then matching on your dictionary?