循环是在满足特定条件的情况下,重复执行某段代码。
num = 0
while num < 10:
print(num)
num += 1
num = 0
while num < 10:
if num == 5:
break
print(num)
num += 1
num = 0
while num < 10:
if num == 5:
continue
print(num)
num += 1
name = ‘zhiliaoketang‘
for x in name:
print(x)
原文:https://www.cnblogs.com/song9998/p/11628914.html