Typescript Convert Number Array Python Practice