Preprocess string for efficient search
<p>I have a fixed string <code>S</code> of size <code>n</code> on which I make a lot of substring queries. One way to optimise for this situation is to preprocess the string and build a suffix tree, or suffix array. After preprocessing, substring queries can be performed optimally on <code>S</code>.</p>

<p>Is there an easy way, in Python, to preprocess strings "out of the box", without having to manually write all the code to build a suffix tree or suffix array?</p>
