<jupyter_start><jupyter_text>We have seen that lists are mutable (they can be changed), and tuples are immutable (they cannot be changed).Let's try to understand this with an example.You are given an immutable string, and you want to make changes to it. Examplestring = "abracadabra"You can access an index by:print string[5]aWhat if you would like to assign a value?string[5] = 'k' Traceback (most recent call last):  File "", line 1, in TypeError: 'str' object does not support item assignment     How would you approach this?One solution is to convert the string to a list and then change the value. Example    string = "abracadabra"    l = list(string)    l[5] = 'k'    string = ''.join(l)    print stringabrackdabra    Another approach is to slice the string and join it back.     Example    >>> string = string[:5] + "k" + string[6:]    print stringabrackdabra<jupyter_code>def mutate_string(string, position, character):
    s_new = string[:position] + character + string[position+1:]
    return s_new

if __name__ == '__main__':
    s = input()
    i, c = input().split()
    s_new = mutate_string(s, int(i), c)
    print(s_new)<jupyter_output>abracadabra
 5 k
{'fraction_non_alphanumeric': 0.09674657534246575, 'fraction_numerical': 0.00684931506849315, 'mean_word_length': 4.104803493449782, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '357728', 'license': 'MIT', 'n_tokens_mistral': 370, 'n_tokens_neox': 360, 'n_words': 146, 'path': 'Python Basic/Week 4/Mutations.ipynb', 'repo_name': 'nomancseku/NSL-HW', 'size': '1168'}