> For the above (abrideged) dictionary, you would generate (use a
> fixed-width "programmers" font so the tree looks good):
> 
>                  a
>                  |
>                  b
>                  |
>                  s
>                 / \
>                i   o
>               /   / \
>              n   l   r
>             /   / \   \
>            t   u   v   b->(absorbirati, crpisti)
>           /    |   |
> (pelin)<-h     t   e->(odrije?iti, osloboditi)
>          |     |
> (pelin)<-e     e->(apsolutan, apsolutni kod)
> 
> As the user enter letters, you just march down the tree, printing
> all the words held in leaf nodes held in the current node.
> 

Call me dense, but how does one do this in Python - which doesn't have 
pointers? Dictionaries with dictionaries within dictionaries... (with 
each letter as the key and the its children as values) is going to be 
extremely space inefficient, right?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to