迭代器協議&自定義迭代器類 自定義迭代器類包含自定義__iter__()&__next__(),不過因為+=1在return前面,導致輸出內容永遠跳過初始數值,不知道怎麼搞,然後我就寫了一個if self.num == 1 print(self.num) 最後則是複習昨天的兩個對象 #第15天 #Python #python学習

Python14159's tweet image. 迭代器協議&自定義迭代器類

自定義迭代器類包含自定義__iter__()&__next__(),不過因為+=1在return前面,導致輸出內容永遠跳過初始數值,不知道怎麼搞,然後我就寫了一個if self.num == 1  print(self.num)

最後則是複習昨天的兩個對象

#第15天 #Python #python学習
Python14159's tweet image. 迭代器協議&自定義迭代器類

自定義迭代器類包含自定義__iter__()&__next__(),不過因為+=1在return前面,導致輸出內容永遠跳過初始數值,不知道怎麼搞,然後我就寫了一個if self.num == 1  print(self.num)

最後則是複習昨天的兩個對象

#第15天 #Python #python学習
Python14159's tweet image. 迭代器協議&自定義迭代器類

自定義迭代器類包含自定義__iter__()&__next__(),不過因為+=1在return前面,導致輸出內容永遠跳過初始數值,不知道怎麼搞,然後我就寫了一個if self.num == 1  print(self.num)

最後則是複習昨天的兩個對象

#第15天 #Python #python学習

United States Trends
Loading...

Something went wrong.


Something went wrong.