Boolean data type

A Boolean data type generally has only two values 'True' or 'False'. Boolean data type is a sub type of integers.

Syntax:

<variable name>=<'True' or 'False'> 

Boolean data types can be referred to as an on and off switch, which has only two values to chose from:

In the preceding example, we try to compare the value of x with the value of y, and when we use the == operator, the value of the Boolean is returned as True.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.47.218