def strings_to_list_string(strings):
    '''Takes a list of strings presumably containing words and phrases,
       and returns a "list" form of those strings, like:

       >>> strings_to_list_string(('cats', 'dogs'))
       >>> 'cats and dogs'

       or

       >>> strings_to_list_string(('pizza', 'pop', 'chips'))
       >>> 'pizza, pop, and chips'

       Raises ValueError if strings is empty.
    '''
    if isinstance(strings, six.string_types):
        raise TypeError('strings must be an iterable of strings, not a string '
                        'itself')
    if len(strings) == 0:
        raise ValueError('strings may not be empty')
    elif len(strings) == 1:
        return strings[0]
    elif len(strings) == 2:
        return ' and '.join(strings)
    else:
        return '{0}, and {1}'.format(', '.join(strings[:-1]),
                                     strings[-1])
def strings_to_list_string ( strings ) : if isinstance ( strings , six . string_types ) : raise TypeError ( 'strings must be an iterable of strings, not a string ' 'itself' ) if len ( strings ) == 0 : raise ValueError ( 'strings may not be empty' ) elif len ( strings ) == 1 : return strings [ 0 ] elif len ( strings ) == 2 : return ' and ' . join ( strings ) else : return '{0}, and {1}' . format ( ', ' . join ( strings [ : - 1 ] ) , strings [ - 1 ] )
Takes a list of strings presumably containing words and phrases,
       and returns a "list" form of those strings, like:

       >>> strings_to_list_string(('cats', 'dogs'))
       >>> 'cats and dogs'

       or

       >>> strings_to_list_string(('pizza', 'pop', 'chips'))
       >>> 'pizza, pop, and chips'

       Raises ValueError if strings is empty.