26. Joining strings together separated by a delimiter

Write a function that, given a list of strings and a delimiter, creates a new string by concatenating all the input strings separated with the specified delimiter. The delimiter must not appear after the last string, and when no input string is provided, the function must return an empty string.

Example: input { "this","is","an","example" } and delimiter ' ' (space), output: "this is an example".

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset