- for、while、if
# for语法
for<目标对象> in <对象集合>
if<条件1>:
语句块1
break;
if<条件1>:
语句块1
contine
语句块3
else
语句块4
while 循环条件:
循环内容
if x<0:
print(x,'负数'
# for语法
for<目标对象> in <对象集合>
if<条件1>:
语句块1
break;
if<条件1>:
语句块1
contine
语句块3
else
语句块4
while 循环条件:
循环内容
if x<0:
print(x,'负数'