Typescript Change Position In Array Python Example