Ask Question
22 April, 08:40

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.

+3
Answers (1)
  1. 22 April, 09:43
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers