QuestionQ102

VerifiedComputer Programming and Python Fundamentals

Consider this code snippet:

Question Image

Which variable will contain False?

Explanation

An empty string is falsy in Python, so bool('') evaluates to False. Nonzero integers, nonempty strings, and nonempty lists evaluate to True; therefore x is the only variable that contains False.

Community Discussion

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