python 循环遍历列表

(1)用 while
在这里插入图片描述

(2)用 for
在这里插入图片描述

由上可知用for更方便些可以直接遍历列表

猜你喜欢

转载自blog.csdn.net/Radiation_x/article/details/104622582