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

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.

主站蜘蛛池模板: 松滋市| 浑源县| 钟山县| 凌云县| 逊克县| 武邑县| 伊宁市| 乌恰县| 湖南省| 长顺县| 中超| 龙江县| 若羌县| 兴隆县| 凭祥市| 芦溪县| 安宁市| 敖汉旗| 莆田市| 乡城县| 波密县| 怀安县| 德江县| 张掖市| 延安市| 聂拉木县| 新竹市| 吉水县| 措美县| 威海市| 洛隆县| 浦东新区| 汾西县| 余庆县| 疏附县| 东宁县| 六枝特区| 瑞金市| 沂南县| 中江县| 兰州市|