Change Array Index Python Function For Even Numbers And Odd