Python方法 __getitem__ 可以實現物件的迭代功能,然後可以使用 for ... in ... 來迭代物件了 class Animal: def __init__(self,animal_list): ...
確定! 回上一頁