Python Return Index Of Item In Array Function