On Android, I am very used to using cursor.moveToLast() to fetch the last item in a cursor. I can't seem to find an equivalent for Python's SQLite, however. Is there a function which will allow me to get the last row of a cursor?
I could just call cursor.fetchall() and get the last item in the list, but is there something more efficient than that? Thanks.
cursor.execute("SELECT * FROM table ORDER BY id DESC LIMIT 1")
result = cursor.fetchone()