Ask Question
18 April, 18:46

How does join work? a. You write separator. join ('a', 'b', 'c', 'd', ...) where 'a', 'b', 'c', 'd' can be replaced with other strings, but isn't in a list. b. The separator must be a single character, and you use list. join (separator). c. You use separator. join (a_list) where a_list is a list of strings. d. You write a_list. join (separator) where a_list is a list of strings, and separator is a string.

+5
Answers (1)
  1. 18 April, 20:59
    0
    c. You use separator. join (a_list) where a_list is a list of strings.

    Explanation:

    The join () is an in-built string method which returns a string concatenated with the elements of an iterable. It concatenates each element of an iterable (such as list, string and tuple) to the string and returns the concatenated string.

    The syntax of join () is:

    string. join (iterable)

    From the above syntax, the string usually mean a separator and the iterable will be a string or list or tuple.

    The answer is C.

    c. You use separator. join (a_list) where a_list is a list of strings.

    It is not A because the iterable could be a string. It is not D because the separator is outside not in the bracket.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “How does join work? a. You write separator. join ('a', 'b', 'c', 'd', ...) where 'a', 'b', 'c', 'd' can be replaced with other strings, but ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers