[파이썬, Python] 논리연산



>>> True

True


>>> True and False

False

>>> True & False

False


>>> True or False

True

>>> True | False

True


>>> not True

False

>>> not False

True


>>> 1 > 0

True

>>> 1 < 0

False

>>> 1 == 0

False

>>> 0 == 0

True

>>> 1 != 0

True

>>> 1 is not 0

True

>>> 1 is 0

False


>>> bool(0)

False

>>> bool(1)

True


반응형

+ Recent posts