from bisect import bisect_left
wordlist[bisect_left(wordlist, word_fragment):bisect_left(wordlist, 
    word_fragment[:-1] + chr(ord(word_fragment[-1]) + 1))]
Fastest way in Python to find a 'startswith' substring in a long sorted list of strings