摘要:
1、短路运算面试题,请说出下列运算的结果 1 or 3 and 4 1 1 and or 0 and 3 报错 0 and 3 and 1 0 1 and 2 or 1 2 -31 and 2 or 1 or 4 2 33 or False and 1 or 5 33 2、用户输入账号密码,程序分别 阅读全文
摘要:
一、赋值运算 age = 18 1、增量赋值 # age = age +=1 age += 1 # age = age - 10 age -= 10 2、交叉赋值 x = 11 y = 22 # temp = z # x=y # y = temp x, y = y, x 3、链式赋值 # y=10 阅读全文