Skip to main content

join

Concatenate list of strings.

def join(
l: list[str],
sep: string = '\n'
) - > string

Concatenate list of strings.

Parameters

NameTypeDescription
llist[str]The list of strings to be concatenated; empty or null-like strings are filtered out before joining.
sepstring = '\n'The separator string to insert between each element in the resulting string.

Returns

TypeDescription
stringA single string containing all non-empty elements from the input list, separated by the specified delimiter.