but lists and strings are different in an important way list value is mutable data typeit can have values addedremovedor changed howevera string is immutableit cannot be changed trying to reassign single character in string results in typeerror erroras you can see by entering the following into the interactive shellname 'zophie catname[ 'thetraceback (most recent call last)file ""line in name[ 'thetypeerror'strobject does not support item assignment the proper way to "mutatea string is to use slicing and concatenation to build new string by copying from parts of the old string enter the following into the interactive shellname 'zophie catnewname name[ : 'thename[ : name 'zophie catnewname 'zophie the catwe used [ : and [ : to refer to the characters that we don' wish to replace notice that the original 'zophie catstring is not modifiedbecause strings are immutable although list value is mutablethe second line in the following code does not modify the list eggseggs [ eggs [ eggs [ the list value in eggs isn' being changed hereratheran entirely new and different list value ([ ]is overwriting the old list value ([ ]this is depicted in figure - if you wanted to actually modify the original list in eggs to contain [ ]you would have to do something like thiseggs [ del eggs[ del eggs[ del eggs[ eggs append( eggs append( eggs append( eggs [