Searched refs:list_of_strings (Results 1 – 1 of 1) sorted by relevance
47 def join_with_separators(list_of_strings, separator=', ', only_two_separator=" and ", last_separato… argument48 if not list_of_strings:50 if len(list_of_strings) == 1:51 return list_of_strings[0]52 if len(list_of_strings) == 2:53 return only_two_separator.join(list_of_strings)54 return "%s%s%s" % (separator.join(list_of_strings[:-1]), last_separator, list_of_strings[-1])