python小笔记-逻辑运算表达式(and,or,not)

and(有假为假,全真才真)

格式:表达式1  and  表达式2

eg:0 and 1 返回0

or(有真为真,全假才假)

格式:表达式1  or  表达式2

eg:0 or 1 返回1

not(真为假,假即真(取反))

格式:not 表达式

eg:not 1 返回0

猜你喜欢

转载自blog.csdn.net/qq_42326585/article/details/81271381