python自学之路-逻辑运算符

一、or运算符

printer(x or y)  x为非零,则返回x,否则返回y

二、and运算符

printer(x and y)  x为非零,则返回y,x为零,则返回x、

原文地址:https://www.cnblogs.com/wuchangblog/p/13311428.html