Typescript Remove Substring From String Python Example