Replace String Using Index In Python