QuestenaUn entraînement qui indique quoi revoir ensuite
Question 13

Which description best fits a Python `str` object?

  1. An immutable sequence of Unicode code pointsBonne réponse
  2. A mutable array containing only ASCII bytes
  3. An unordered collection of character objects
  4. A numeric sequence that decodes itself on access

Explication

A Python string represents Unicode text as an immutable sequence, so its existing positions cannot be edited in place. Calling it a mutable byte array confuses text with a different data model and ignores non-ASCII code points.

Continuer avec ce test

Commencer l’entraînement
Question 13: Which description best fits a Python `str` object? · Python Fundamentals · Questena