<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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. 'apples, pears and bananas' '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:])])