Boolean Expressions
Boolean Values & Expressions
bool1 = Truebool2 = 3*3 == 9bool3 = Falsebool4 = 3*3 != 9Output:
print(bool1, bool2, bool3, bool4)True True False False
print(type(bool1))<class 'bool'>

Last updated