QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 111

Classify the None-sentinel pattern when a function creates a new list for None and otherwise uses the received object. Which statements are true? Select all that apply.

  1. None becomes one shared mutable list automatically.
  2. Each omitted call can receive a newly created list.Ճիշտ պատասխան
  3. The pattern still reuses one hidden list across calls.
  4. An explicitly supplied list can still be used as supplied.Ճիշտ պատասխան

Բացատրություն

An omitted argument represented by None triggers creation of a fresh list during that call, preventing accidental sharing between omitted calls. An explicitly supplied list remains the caller's object; None does not secretly turn into one persistent mutable container.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 111: Classify the None-sentinel pattern when a function creates… · Python Fundamentals · Questena