# Python CodeRecipe|TRUEの使い方

Home Python Keywords

# TRUEの例1

Print the result of the comparison "7 is larger than 6":

    print(7 > 6)

# TRUEの定義及び使い方

True関数はブール値です。 比較演算の結果。 True関数は1と同じです (False は0と同じ)。

# TRUEの例2

Other comparisons that returns 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])

Related Pages The False keyword. Read more about comparisons in our Python Operators Tutorial.

Home Python Keywords