由上面程式碼,兩種方法都顯示, list object 有 __iter__ 以及 __getitem__ 但沒有 __next__ ,所以是Iterable 但不是Iterator。但是,透過call iter(x) ...
確定! 回上一頁