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

For truth testing in Python conditionals, which values are falsy? Select all that apply.

  1. `0`Ճիշտ պատասխան
  2. `"0"`
  3. `[]`Ճիշտ պատասխան
  4. `[0]`

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

Numeric zero and an empty list have false truth values, so a condition using either enters its false path. The strings `0` and a one-element list are nonempty and therefore truthy despite containing values that may look false-like.

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

Սկսել վարժանքը
Հարց 50: For truth testing in Python conditionals, which values are… · Python Fundamentals · Questena