Typescript Array Methods Python Definition