列表中冒號用法 · import numpy as np · L = (1,2,3,5,8,13,21) · i, j = 3, 5 · print(L[i]) #取第i個元素 · print(L[-i]) #取倒數第i個元素 · print(L[i:j]) # ...
確定! 回上一頁