摘要: python里的逻辑运算是按从左到右进行一旦前面能判断出真假值,后面的就不运行。如 False and True or True and True 的值为False,因为第一个为False,无论后面是什么and的值都为假。再如 n+=1 等于n=n+1 其他运算符号同理 一个定义了类型的变量n输入. 阅读全文
posted @ 2018-11-30 20:29 Matrixssy 阅读(259) 评论(0) 推荐(0)