Typescript Index Of Element In Python