Typescript Find Index Of Element Python