def get_comma_sep_string_from_list(items):

    if not items:
        return ''

    if len(items) == 1:
        return items[0]

    return '%s and %s' % (', '.join(items[:-1]), items[-1])
Validate item assignment to list.
dataset/ETHPy150Open oppia/oppia/utils.py/get_comma_sep_string_from_list--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/messages.py/FieldList.__setitem__