#迭代器import syslist=[1,2,3,4]it=iter(list)while True: try: print(next(it)) except StopIteration: sys.exit()
#迭代器it=iter(list)print(next(it))print(next(it))print(next(it))print(next(it))