Indexing a list, the safe way · if index > len(someList): # should be len(someList) - 1 · # handle out-ot-range index · else: · item = someList[index].
確定! 回上一頁