def lookup(self, prefix, lo=<NUM_LIT:0>, hi=None):
words = self.words<EOL>if hi is None: hi = len(words)<EOL>i = bisect.bisect_left(words, prefix, lo, hi)<EOL>if i < len(words) and words[i].startswith(prefix):<EOL><INDENT>return i, (words[i] == prefix)<EOL><DEDENT>else:<EOL><INDENT>return None, False<EOL><DEDENT>
See if prefix is in dictionary, as a full word or as a prefix.
        Return two values: the first is the lowest i such that
        words[i].startswith(prefix), or is None; the second is
        True iff prefix itself is in the Wordlist.