{"id":24565,"date":"2021-10-21T10:10:19","date_gmt":"2021-10-21T04:40:19","guid":{"rendered":"https:\/\/python-programs.com\/?p=24565"},"modified":"2021-11-05T19:37:48","modified_gmt":"2021-11-05T14:07:48","slug":"python-bool-function-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-bool-function-with-examples\/","title":{"rendered":"Python bool() Function with Examples"},"content":{"rendered":"

In the previous article, we have discussed Python Program for abs() Function<\/a>
\nbool() Function in Python:<\/strong><\/p>\n

Using the standard truth testing procedure, the Python bool() function returns or converts a value to a Boolean value, i.e., True or False.<\/p>\n

Syntax:<\/strong><\/p>\n

bool([value])<\/pre>\n

Parameters<\/strong><\/p>\n

In general, the bool() method takes only one parameter (value), to which the standard truth testing procedure can be applied. If no parameters are passed, it returns False by default. As a result, passing a parameter is optional.<\/p>\n

Return Value:<\/strong><\/p>\n

bool() function can only return one of two values.<\/p>\n