def contains_prefix(root, input_prefix):
    """Check if prefix exists and return True/False w/ num of words with that prefix."""

    output_list = []

    cNode = root

    for char in list(input_prefix):
        found_match = False
        for node in cNode.nodes:
            if node.char == char:
                found_match = True
                cNode = node
                break
        if not found_match:
            return False, 0

    return True, cNode.num_words_at_letter