I have tried to solve this but it is giving runtime error.
In this code, we have to change a specified index by a specified character in a string. I am confused with the syntax part can anyone help?
I have written this code and it is giving “EOF error”:
def mutate_string(string, position, character):
s = input()
i,k = input().split()
print (s[:int(i)]+k+s[int(i)+1:])
if __name__ == '__main__':
s = input()
i, c = input().split()
s_new = mutate_string(s, int(i), c)