python-用pytree实现查找前缀包含指定串的字符串

from pytrie import SortedStringTrie as Trie

List = Trie(意气风发 = 1,神采奕奕 = 2, 意气扬扬= 3,意往神驰 = 4,意兴盎然 = 5,意合情投 = 6)

print(List.keys(prefix=''))
View Code

 

posted @ 2021-09-28 21:08  starlightlmy  阅读(103)  评论(0)    收藏  举报