Questenaتمرینی که نشان می‌دهد بعد چه چیزی را مرور کنید
سؤال 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.پاسخ درست
  3. The single-quoted form is immutable; the other is mutable.
  4. The double-quoted form performs interpolation automatically.

توضیح

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.

ادامهٔ این آزمون

شروع تمرین
سؤال 14: How do the literals `'blue'` and `"blue"` differ when… · Python Fundamentals · Questena