1.赋值
x = x + 1
print(x)
"""
A 报错
B 10
C 11
D 不知道
"""
2.交叉赋值
m, n = n, m
print(m, n) # 999 100
3.解压赋值
name_list = ['jason', 'kevin', 'tony', 'oscar']
a, *b, c = name_list
print(a) # jason
print(b) # ['kevin', 'tony']
print(c) # oscar
4.while循环
# 循环打印1-10 遇到4跳过
count = 1
while count < 11:
if count == 4:
count += 1
continue # 直接结束本次循环 开始下一次循环
print(count)
count += 1
标签:count,面试题,jason,基础,循环,print,赋值
From: https://www.cnblogs.com/xm15/p/16735782.html