如何用Pythoncontinue语句及单个for循环输出10~20之间的所有奇数及21~30间的?

如题所述

第1个回答  2020-06-12
其实可以不用continue,因为你用for循环就会遍历所有的数据了。10-20之间的奇数code如下:
list=[]
for i in range(10,20):
if i%2!=0:
list.append(i)本回答被网友采纳
相似回答