Run
x = 'apple' y = 'banana' i = 2 x = x[:i] + y + x[i:] print(x)
Output