- 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.
推薦閱讀
- C語言程序設計立體化案例教程
- MariaDB High Performance
- Python Geospatial Development(Second Edition)
- C語言從入門到精通(第4版)
- 軟件架構:Python語言實現
- Hands-On Functional Programming with TypeScript
- Hands-On Full Stack Development with Go
- Mastering openFrameworks:Creative Coding Demystified
- Bootstrap 4 Cookbook
- HoloLens與混合現實開發
- 計算機應用基礎教程(Windows 7+Office 2010)
- uni-app跨平臺開發與應用從入門到實踐
- Mastering Elixir
- 算法設計與分析:基于C++編程語言的描述
- 超簡單:用Python讓Excel飛起來(實戰150例)