QuestenaPractice that shows what to review next
Question 23

What is the result of `"-".join(["a", "b", "c"])`?

  1. `abc-`
  2. `-a-b-c-`
  3. `a-b-c`Correct answer
  4. `["a-b-c"]`

Explanation

The receiver supplies the separator inserted between adjacent string elements, so the result is `a-b-c`. No separator is appended after the final element, and the operation is not invoked on the list itself.

Continue with this test

Start practice
Question 23: What is the result of `"-".join(["a", "b", "c"])`? · Python Fundamentals · Questena