2019年5月30日

python for 无限循环

摘要: 1 class Infinit: 2 def __iter__(self): 3 return self 4 5 def __next__(self): 6 return None 7 8 for i in Infinit(): 9 print("好嗨哟,你是不是学会了for的无限循环!") 阅读全文

posted @ 2019-05-30 16:44 林肯公园 阅读(1537) 评论(0) 推荐(0)

导航