官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 舟曲县| 合肥市| 平顺县| 临湘市| 顺昌县| 濉溪县| 红河县| 南澳县| 闸北区| 高台县| 大冶市| 板桥市| 偃师市| 杂多县| 如皋市| 镇远县| 侯马市| 阿拉善盟| 乐业县| 新密市| 石城县| 湘阴县| 永春县| 承德县| 新宾| 浦县| 杭锦旗| 贺兰县| 沅江市| 涿鹿县| 吉林市| 贵南县| 泰宁县| 水富县| 周至县| 新民市| 镇平县| 钦州市| 兖州市| 梅河口市| 乌拉特前旗|