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)]))

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 ) ] ) )
turns a list of items into a comma-separated string .