Mutations

  • + 0 comments

    I think this code work perfectly

    def mutate_string(string, position, character): lst = list(string) lst[position] = character string1 = ' '.join(lst) return string1

    if name == 'main': s = input() i, c = input().split() s_new = mutate_string(s, int(i), c) print(s_new)