def add_note(self, position, note): if not notes.isNote(note): raise Exception("add_note must take a Note object as its third argument.") else: self.note_list.insert(position, note)
def all_notes(self, ls): for element in ls: if not notes.isNote(element): return False return True