Typescript Get Last Index Of Array Python Questions