if语句
if ...: pass elif ...: pass else: pass
for循环
for i in range(10): print(i)
while循环
while True: if ...: pass else: break
break、continue
break,跳出整个循环
continue,跳出当次循环继续下次循环
三元运算
a=1 b=2 c=3 d = a if a > b else c
时间: 2024-08-05 20:51:19
if语句
if ...: pass elif ...: pass else: pass
for循环
for i in range(10): print(i)
while循环
while True: if ...: pass else: break
break、continue
break,跳出整个循环
continue,跳出当次循环继续下次循环
三元运算
a=1 b=2 c=3 d = a if a > b else c