Typescript Remove Item From String Python Functions