摘要:
1 # 不用len() 2 # s = "景老板小护士" 3 # i = 0 4 # for k in s: 5 # i += 1 6 # print(i) 7 8 # def my_len(): 9 # i = 0 10 # for k in s: 11 # i += 1 12 # return i ... 阅读全文
摘要:
1 #逻辑运算 2 # and or not 3 #优先级, () > not > and > or 如果同一优先级 从左到右依次计算 4 # print(2 > 1 and 1 6 or 2 4 or 4 2) 10 # print(2 > 1 and 3 5 and 2 1 and 3 5 and 2 > 1 and 9 > 8 or 7 int 3... 阅读全文