【Python面試題】請(qǐng)解釋一下Python中的邏輯運(yùn)算符?
【答案】:
Python中有3個(gè)邏輯運(yùn)算符: and, or, not。
>>> False and True
False
>>> 7<7 or True
True
>>> not 2==2
False
【返回早報(bào)】
【答案】:
Python中有3個(gè)邏輯運(yùn)算符: and, or, not。
>>> False and True
False
>>> 7<7 or True
True
>>> not 2==2
False
【返回早報(bào)】