Python True 關鍵字
定義和用法
True 關鍵字是一個布爾值,是比較運算的結果。
True 關鍵字與 1 相同(Fals 與 0 相同)。
更多實例
實例
其他返回 True 的比較:
print(5 < 6) print(2 in [1,2,3]) print(5 is 5) print(5 == 5) print(5 == 5 or 6 == 7) print(5 == 5 and 7 == 7) print("hello" is not "goodbye") print(not(5 == 7)) print(4 not in [1,2,3])