Python False 關鍵字
定義和用法
False
關鍵字是一個布林值,也是比較操作的結果。
False
關鍵字與 0 相同(True
與 1 相同)。
更多示例
示例
其他返回 False 的比較
print(5 > 6)
print(4 in [1,2,3])
print("hello" is "goodbye")
print(5 == 6)
print(5 == 6 or 6 == 7)
print(5 == 6 and 6 == 7)
print("hello" is not "hello")
print(not(5 == 5))
print(3 not in [1,2,3])
自己動手試一試 »
相關頁面
True
關鍵字。
在我們的Python 運算子教程中閱讀更多關於比較的內容。