This is my id number which comes from the database but when I delete a data the index number will not be updated, please help me if there is any solution to reindex
Based on the SQLite documentation, I'd say: c.execute("REINDEX <table_name>") con.commit() where <table_name> is your table name, obviously.