def grammatical_join(l, initial_joins=", ", final_join=" and "):
    """
    Display a list of items nicely, with a different string before the final
    item. Useful for using lists in sentences.

    >>> grammatical_join(['apples', 'pears', 'bananas'])
    'apples, pears and bananas'

    >>> grammatical_join(['apples', 'pears', 'bananas'], initial_joins=";", final_join="; or ")
    'apples; pears; or bananas'

    :param l: List of strings to join
    :param initial_joins: the string to join the non-ultimate items with
    :param final_join: the string to join the final item with
    :return: items joined with commas except " and " before the final one.
    """
    # http://stackoverflow.com/questions/19838976/grammatical-list-join-in-python
    return initial_joins.join(l[:-2] + [final_join.join(l[-2:])])