Al Bull wrote: > Quick question then... > > Does this do the trick?
I may have misunderstood your original question; do you want to delete records from the database or from the Python list? Your code below will do the latter, once you have fixed the bugs. > Currentrecord = 1 > > While currentrecord <= len(ord_rows): > if savedbasub == currentrecord.ord_dbasub: > ord_rows.remove(currentrecord) > delcount += 1 > else: > savedbasub = currentrecord.ord_dbasub > currentrecord =+ 1 As the general idea is correct I'll encourage you to try to fix these bugs yourself. The first thing you have to resolve: is currentrecord an index or an object representing a database row? _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
