1、while循环:当满足条件时执行
if __name__ == '__main__':
a = 1
while a < 5:
print('循环...')
a += 1
2、for循环
if __name__ == '__main__':
list1 = ['zhang', 'li', 'wang']
for l in list1:
print(l)
1、while循环:当满足条件时执行
if __name__ == '__main__':
a = 1
while a < 5:
print('循环...')
a += 1
2、for循环
if __name__ == '__main__':
list1 = ['zhang', 'li', 'wang']
for l in list1:
print(l)