Ask Question
13 February, 01:50

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.

+4
Answers (1)
  1. 13 February, 02:07
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers