摘要: Python的for循环本质上就是通过不断调用next()函数实现的,例如: for x in [1, 2, 3, 4, 5]: pass 实际上等价于: # 首先获得Iterator对象: it = iter([1, 2, 3, 4, 5]) # 循环: while True: try: # 获得 阅读全文
posted @ 2023-05-17 20:39 limalove 阅读(40) 评论(0) 推荐(0)