QuestenaПрактика, после которой понятно, что повторить
Вопрос 23

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

  1. `abc-`
  2. `-a-b-c-`
  3. `a-b-c`Правильный ответ
  4. `["a-b-c"]`

Объяснение

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.

Продолжить работу с тестом

Начать тренировку
Вопрос 23: What is the result of `"-".join(["a", "b", "c"])`? · Python Fundamentals · Questena