insert(' ' insert(' ' insert(' ' insert(' ' cursor home( insert("*"print("join( characters)hello *world nowsince we've been using that string join function lot (to concatenate the characters so we can see the actual document contents)we can add property to the document class to give us the complete string@property def string(self)return "join(self charactersthis makes our testing little simplerprint( stringhello world this framework is simple (though it might be bit time consuming!to extend to create and edit complete plaintext document nowlet' extend it to work for rich texttext that can have boldunderlinedor italic characters there are two ways we could process thisthe first is to insert "fakecharacters into our character list that act like instructionssuch as "bold characters until you find stop bold characterthe second is to add information to each character indicating what formatting it should have while the former method is probably more commonwe'll implement the latter solution to do thatwe're obviously going to need class for characters this class will have an attribute representing the characteras well as three boolean attributes representing whether it is bolditalicor underlined hmmwaitis this character class going to have any methodsif notmaybe we should use one of the many python data structures insteada tuple or named tuple would probably be sufficient are there any actions that we would want to do toor invoke on character