파이썬 python 논리 연산자 and, or, not 간단구현


파이썬 python 논리 연산자 and, or, not 간단구현

and 연산자 x = True y = False # and operator print(x and y) # outputs: False print(x and x) # outputs: True print(y and y) # outputs: False or 연산자 x = True y = False # or operator print(x or y) # outputs: True print(x or x) # outputs: True print(y or y) # outputs: False not 연산자 x = True y = False # not operator print(not x) # outputs: False print(not y) # outputs: True


원문링크 : 파이썬 python 논리 연산자 and, or, not 간단구현