0
from pytrie import SortedStringTrie as trie
t = trie(yuva=0,yuvaka=1,yuvaraaja=2,yuvati=3,varadi=4,varadigaara=5)
x = t.keys(prefix='yu')
print (x)

When this code is executed following error is shown

"ImportError: Cannot import name 'SortedStringTrie' ".

Haifeng Zhang
  • 30,077
  • 19
  • 81
  • 125
Soty
  • 129
  • 1
  • 1
  • 4

1 Answers1

0

please run help('modules') under your python to check whether pytrie has been installed

or run pip if you'd installed pip

Deng Haijun
  • 109
  • 1
  • 8
  • if the module was not installed the error would say `ImportError: No module named 'pytrie'`, but since the OP called their script `pytrie.py` they ended up importing their own file instead of the installed module – Tadhg McDonald-Jensen Mar 29 '16 at 02:18