we'll answer these questions as we gobut let' start with the simplest possible document class first and see what it can doclass documentdef __init__(self)self characters [self cursor self filename 'def insert(selfcharacter)self characters insert(self cursorcharacterself cursor + def delete(self)del self characters[self cursordef save(self)with open(self filename' 'as ff write('join(self characters)def forward(self)self cursor + def back(self)self cursor - this simple class allows us full control over editing basic document have look at it in actiondoc document(doc filename "test_documentdoc insert(' 'doc insert(' 'doc insert(' 'doc insert(' 'doc insert(' '"join(doc characters'hellodoc back(doc delete(doc insert(' '"join(doc characters'hellp