因此, for in 實際上是對 xrange 傳回的產生器進行迭代,如果一個物件具有 __next__ 方法, for in 會呼叫 __next__ 方法取得值,並在遇到 StopIteration ...
確定! 回上一頁