Javascript Replace Text In String Python Functions With Variable Number