QuestenaUn entraînement qui indique quoi revoir ensuite
Question 23

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

  1. `abc-`
  2. `-a-b-c-`
  3. `a-b-c`Bonne réponse
  4. `["a-b-c"]`

Explication

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.

Continuer avec ce test

Commencer l’entraînement
Question 23: What is the result of `"-".join(["a", "b", "c"])`? · Python Fundamentals · Questena