Typescript Turn String Into Array Python Definition