Typescript Change Position In Array Python