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

Method list_words_from_node

Word_Dictionary/dictionary.py:24–29  ·  view source on GitHub ↗
(self, node: Dict, spelling: str)

Source from the content-addressed store, hash-verified

22 return "is_word" in node
23
24 def list_words_from_node(self, node: Dict, spelling: str) -> None:
25 if "is_word" in node:
26 self.words_list.append(spelling)
27 return
28 for ltr in node:
29 self.list_words_from_node(node[ltr], spelling + ltr)
30
31 def print_all_words_in_dictionary(self) -> List[str]:
32 node = self.node

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected