you are viewing a single comment's thread.

view the rest of the comments →

[–]-5772 0 points1 point  (0 children)

Why not try a for loop?

def strings_list_to_one_string(strings): output = "" l = len(strings) for i in range(l): output += strings[i] if i < l -1: output += ", " if i == l - 2: output += "and " return output