MCPcopy Create free account
hub / github.com/geekcomputers/Python / suggest_words_starting_with

Method suggest_words_starting_with

Word_Dictionary/dictionary.py:37–45  ·  view source on GitHub ↗
(self, prefix: str)

Source from the content-addressed store, hash-verified

35 return self.words_list
36
37 def suggest_words_starting_with(self, prefix: str) -> List[str]:
38 node = self.node
39 for ltr in prefix:
40 if ltr not in node:
41 return False
42 node = node[ltr]
43 self.words_list = []
44 self.list_words_from_node(node, prefix)
45 return self.words_list
46
47
48# Your Dictionary object will be instantiated and called as such:

Callers 1

dictionary.pyFile · 0.80

Calls 1

list_words_from_nodeMethod · 0.95

Tested by

no test coverage detected