QuestenaPractice that shows what to review next
Question 14

How do the literals `'blue'` and `"blue"` differ when evaluated?

  1. Single quotes produce a character array; double quotes produce text.
  2. They produce equal strings of the same type.Correct answer
  3. The single-quoted form is immutable; the other is mutable.
  4. The double-quoted form performs interpolation automatically.

Explanation

Both quote styles delimit a string literal and produce the same `str` value here. Python does not have a separate character-literal type selected by single quotes, so the claimed type difference is false.

Continue with this test

Start practice
Question 14: How do the literals `'blue'` and `"blue"` differ when… · Python Fundamentals · Questena