Python bool() FunctionThe python bool() method converts value to boolean (True or False) using the standard truth testing procedure. SignatureParametersIt is not mandatory to pass value to bool(). If you do not pass the value, bool() returns False. In general , bool() takes a single parameter value. ReturnThe bool() returns:
Python bool() Function ExampleOutput: [] is False [0] is True 0.0 is False None is False True is True Easy string is True
Next TopicPython Built in Functions
|