strings strings are immutable it is tempting to use the operator on the left side of an assignmentwith the intention of changing character in string for examplegreeting 'helloworld!greeting[ 'jtypeerror'strobject does not support item assignment the "objectin this case is the string and the "itemis the character you tried to assign for nowan object is the same thing as valuebut we will refine that definition later an item is one of the values in sequence the reason for the error is that strings are immutablewhich means you can' change an existing string the best you can do is create new string that is variation on the originalgreeting 'helloworld!new_greeting 'jgreeting[ :print(new_greetingjelloworldthis example concatenates new first letter onto slice of greeting it has no effect on the original string looping and counting the following program counts the number of times the letter "aappears in stringword 'bananacount for letter in wordif letter =' 'count count print(countthis program demonstrates another pattern of computation called counter the variable count is initialized to and then incremented each time an "ais found when the loop exitscount contains the resultthe total number of ' exercise encapsulate this code in function named countand generalize it so that it accepts the string and the letter as arguments