database programming to be able to edit dvdthe user must first choose the dvd to work on this is just matter of getting the title since titles are used as keys with the values holding the other data since the necessary functionality is needed elsewhere ( when removing dvd)we have factored it out into separate find_dvd(function that we will look at next if the dvd is found we get the user' changesusing the existing values as defaults to speed up the interaction (we have omitted most of the user interface code for this function since it is almost the same as that used when adding dvd at the end we store the data just as we did when adding if the title is unchanged this will have the effect of overwriting the associated valueand if the title is different this has the effect of creating new key-value itemin which case we delete the original item def find_dvd(dbmessage)message "(start oftitle to message while truematches [start console get_string(message"title"if not startreturn none for title in dbif title lower(startswith(start lower())matches append(titleif len(matches= print("there are no dvds starting with"startcontinue elif len(matches= return matches[ elif len(matchesdisplay_limitprint("too many dvds start with { }try entering "more of the titleformat(start)continue elsematches sorted(matcheskey=str lowerfor imatch in enumerate(matches)print("{ }{ }format( match)which console get_integer("number (or to cancel)""number"minimum= maximum=len(matches)return matches[which if which ! else none to make finding dvd as quick and easy as possible we require the user to type in only one or the first few characters of its title once we have the start of the title we iterate over the dbm and create list of matches if there is one match we return itand if there are several matches (but fewer than display_limitan integer set elsewhere in the programwe display them all in case-insensitive order with number beside each one so that the user