1.列表list的遍历 ##### while遍历 需要len(list) list = [11,22,33,44,55] len_list = len(list) i = 0 while i<len_list: print(list[i]) i += 1 ###### for 遍历 (不用控制元素的个数,以及下标)推荐 list = [1,2,3,4,5,6,7,8,9] for i in list: print(i) 2.for循环的else (flag) #### 执行else的语句 l…