Typescript Insert Into Array Python Question