Typescript Map To Array Python Question