Typescript Loop Through String Array Python