Replace String Using Index In Python Example Problem