代码点读机 / Python / <=

<= Python · 运算符

小于或等于比较。

怎么用

a <= b

小例子

print(5 <= 5)
print(6 <= 5)

运行结果

True
False

官方文档:https://docs.python.org/zh-cn/3/reference/expressions.html#comparisons

在代码里遇到不认识的词?打开代码点读机,点一下就懂 → ← Python全部词条