Python iteration over non-sequence

You are trying to iterate over the object itself, which is returning the error. You want to iterate over the list inside the object, in this case Notes.notes (which is somewhat confusing naming, you may want to distinguish the internal list by using another name for the instance of the notebook object).

for note in Notes.notes:
    print(note.memo)

Leave a Comment