关于逻辑运算案例笔记

 1 #给 t 赋值为Thue,T 赋值为False,f 赋值为False,F 赋值为True
 2 t = True
 3 T = False
 4 f =  False
 5 F = True
 6 
 7 #两边均正确取最右,不然False
 8 t and F
 9 t and T
10 T and f
11 f and F 
12 
13 #两边都正确取最近(左);若有一个正确,则取正确的那个;不然False
14 t or F
15 t or T
16 T or f
17 f or F
18  
19 #取非,逻辑取反
20 not True
21 not False
相关文章
相关标签/搜索