Dinesh B Vadhia wrote:
> Ignore the 'adjacent items' remark.   The rest is correct ie. looking 
> for all strings containing a substring x.

Perhaps this would help:
http://hkn.eecs.berkeley.edu/~dyoo/python/suffix_trees/

A SubstringDict that maps each string to itself would do exactly what 
you want. I have no idea what the performance would be...

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to