Find all words beginning with a given prefix
Sentinel could simply be None instead of a "custom" object.
You don't need chain either: just set the sentinel manually at the end of the for loop.
If using Python 3, you can use yield from ... instead of from ...: yield.




def insert(tree, word):
    for letter in word:
        tree = tree.setdefault(letter, {})
    tree[None] = {}  # or = None, it doesn't matter


def words_beginning_with(start, tree):
    for letter in start:
        try:
            tree = tree[letter]
        except KeyError:
            return
    for word in _all_words(tree):
        yield start + word


def _all_words(tree, start=''):
    for letter, tree in tree.items():
        if letter is None:
            yield start
        else:
            yield from _all_words(tree, start + letter):