Python 中想要使類的例項像list一樣使用下標,可以用__getitem__方法,而配合slice物件則可以實現list一樣的切片,詳解Python中的__getitem__方法與slice ...
確定! 回上一頁