Typescript Record To Array Python Practice