- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 81字
- 2021-07-09 20:40:24
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.
推薦閱讀
- iOS Game Programming Cookbook
- jQuery Mobile Web Development Essentials(Third Edition)
- Learn TypeScript 3 by Building Web Applications
- Java 9 Concurrency Cookbook(Second Edition)
- What's New in TensorFlow 2.0
- Mastering Objectoriented Python
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- 數據結構習題精解(C語言實現+微課視頻)
- Production Ready OpenStack:Recipes for Successful Environments
- 面向STEM的Scratch創新課程
- 人人都是網站分析師:從分析師的視角理解網站和解讀數據
- Unity 2D Game Development Cookbook
- C++從入門到精通(第6版)
- Getting Started with Python
- Learning Cocos2d-JS Game Development