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

What does `bool(value)` return for an arbitrary Python object?

  1. The original object unchanged
  2. A Boolean value, exactly `True` or `False`Ճիշտ պատասխան
  3. Only the integer 0 or 1, never a Boolean
  4. A Boolean only when the input is numeric

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

The call applies the object's truth-value rules and produces exactly one of the two Boolean values. It does not return the original operand, even when that operand itself controls the truth result.

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

Սկսել վարժանքը
Հարց 51: What does `bool(value)` return for an arbitrary Python… · Python Fundamentals · Questena