Typescript Generate Random String Python Replace Method