Insert many words in the tree Args: words (list[str]): list of words >>> RadixNode("myprefix").insert_many(["mystring", "hello"])
(self, words: list[str])
| 37 | return self.prefix[:x], self.prefix[x:], word[x:] |
| 38 | |
| 39 | def insert_many(self, words: list[str]) -> None: |
| 40 | """Insert many words in the tree |
| 41 | |
| 42 | Args: |
| 43 | words (list[str]): list of words |
| 44 | |
| 45 | >>> RadixNode("myprefix").insert_many(["mystring", "hello"]) |
| 46 | """ |
| 47 | for word in words: |
| 48 | self.insert(word) |
| 49 | |
| 50 | def insert(self, word: str) -> None: |
| 51 | """Insert a word into the tree |