Data Types: Boolean

The Boolean data type is named after the nineteenth century British mathematician George Boole. The Boolean data type consists of only two data values–true and false. In Python, Boolean literals can be written in several ways, but most programmers prefer the use of the standard values True and False. Simple Boolean expressions consist of the Boolean values (True and False), variables bound to those values, functions calls that return Boolean values, or comparisons. The condition in the selections statement is usually in the form of a comparison. The following is a table of comparison operators which are the most often used in Boolean expressions.

Leave a comment