How to Convert a String to a Boolean in Python?
You can convert a string value s to a Boolean value using the Python function bool(s). Here are a few examples: As you can see, any string will be converted to the Boolean value True–with one exception: the empty string ”. This is contra-intuitive for many people because they think that the string ‘False’ should … Read more