Join words with a space
Input
join_with_separator(['hello', 'world'], ' ')
Output
hello world
Each item is a string; they are joined with a single space.
Full lesson preview
Write a function that joins a sequence of items into a single string using a provided separator.
Problem statement
Task
Examples
Input
join_with_separator(['hello', 'world'], ' ')
Output
hello world
Each item is a string; they are joined with a single space.
Input format
Output format
Constraints
Samples
Input
join_with_separator(['a', 'b', 'c'], ',')
Output
a,b,c
The list items are joined by a comma.