strings on diskso that' what you get when the data is read back in you can either add the new data as string or create formatdata object and then use the __str__(method to output the data as string the next step is to remove record from newdata to perform this taskyou must first find the record of coursethat' easy when working with just four records (remember that newdata now has record for harry in itwhen working with large number of recordsyou must first search for the record using the index(function this act provides you with number containing the location of the recordwhich you can then use to retrieve the actual record after you have the actual recordyou can remove it using the remove(function modifying sally' record looks daunting at firstbut againmost of this code is part of dealing with the string storage on disk when you obtain the record from newdatawhat you receive is single string with all three values in it the split(function produces list containing the three entries as stringswhich still won' work for the application in additionsally' name is enclosed in both double and single quotes the simplest way to manage the record is to create formatdata object and to convert each of the strings into the proper form this means removing the extra quotes from the nameconverting the second value to an intand converting the third value to bool the formatdata class doesn' provide accessorsso the application modifies both the married and age fields directly using accessors (getter methods that provide read-only access and setter methods that provide write-only accessis better policy the application then appends the new record to and removes the existing record from newdata notice how the code uses newrecord __str__(to convert the new record from formatdata object to the required string the final act is to save the changed record normallyyou' use the same file to save the data howeverthe example saves the data to different file in order to allow examination of both the old and new data choose runrun module you see the output shown in figure - notice that the application lists the records after each change so that you can see the status of newdata this is actually useful troubleshooting technique for your own applications of courseyou want to remove the display code before you release the application to production open the changedfile csv file using an appropriate application you see output similar to that shown in figure - this output is shown using wordpadbut the data won' change when you use other applications soeven if your screen doesn' quite match figure - you should still see the same data