python 如果跳过指定数目的循环
时间:2020-06-16 13:18:29
收藏:0
阅读:225
使用next函数
it = iter(range(10))
for i in it:
try:
next(it)
next(it)
print(i)
except Exception as e:
pass
原文:https://www.cnblogs.com/yjybupt/p/13140016.html
评论(0)