ProgrammingEasyTCS NQT · Wipro pattern

What is printed?

What is printed?
print(bool("False"), bool(""), bool(0.0))
  1. A. True False False
  2. B. False False False
  3. C. True False True
  4. D. False True False

Correct answer: A. True False False

Any non-empty string is truthy, including "False". The empty string and 0.0 are falsy.

More Python Programming questions

Exams that ask this topic