Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 341 Bytes

01-布尔类型和比较运算符.md

File metadata and controls

25 lines (20 loc) · 341 Bytes

布尔类型

  1. True:真
  2. False:假

比较运算符

  1. ==
  2. !=
  3. >
  4. <
  5. >=
  6. <=
# 定义变量存储布尔类型的数据
bool = True
print(f"{bool} 类型是:{type(bool)}")
print(f"{False} 类型是:{type(False)}")

# 比较运算符
num1 = 10
num2 = 10
print(f"10==10 => {num1 == num2}")