python 重新执行循环中出错的那一次

# coding: utf-8
li = [1,2,3,4,5]
for num in li:
    while True:
        try:
            # do something
        except some error:
            continue
        break

  

posted @ 2016-07-13 14:46  捕蛇者说  阅读(4968)  评论(0编辑  收藏  举报