The typical Python iteration protocol: for y in x... is as follows: iter = x.__iter__() # get iterator try: while 1: y = iter.next() # get each item .
確定! 回上一頁