To get the last inserted rowid, use the cursor's lastrowid
attribute.
To delete a record with a specific rowid, use that column in the WHERE condition:
cursor.execute("INSERT INTO input33(Name) VALUES(?)", ("whatever",))
rowid = cursor.lastrowid
cursor.execute("DELETE FROM input33 WHERE rowid = ?", (rowid,))