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