Replace String Using Index In Python For Loop