Please don't reuse variables with a different type. While it works, it just leaves you open to issues. A cleaner way to do this is something like `last_question_id = max([quiz_ids[i].data["id"] for i in quiz_ids])`