QuestionQ185

VerifiedComputer Programming and Python Fundamentals

What output is expected from the following code?

Question Image

Explanation

Python treats 0, an empty string, and None as falsy values, while a nonzero integer and a nonempty string are truthy. Applying not therefore produces True, False, True, False, and True, respectively.

Community Discussion

No comments yet. Be the first to start the discussion!