Typescript Get Last Index Of Array In Python Declaration