notes[ id notes[ id notes[ memo 'hello worldn search("hello"[<notebook note object at xb ac> search("world"[ modify_memo( "hi world" notes[ memo 'hi worldit does work the code is little messy thoughour modify_tags and modify_memo methods are almost identical that' not good coding practice let' see how we can improve it both methods are trying to identify the note with given id before doing something to that note solet' add method to locate the note with specific id we'll prefix the method name with an underscore to suggest that the method is for internal use onlybut of courseour menu interface can access the method if it wants todef _find_note(selfnote_id)'''locate the note with the given id ''for note in self notesif note id =note_idreturn note return none def modify_memo(selfnote_idmemo)'''find the note with the given id and change its memo to the given value ''self _find_note(note_idmemo memo this should work for now let' have look at the menu interface the interface simply needs to present menu and allow the user to input choices here' our first tryimport sys