Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [(23026, ), (23038, ), (23039, ), (23040, ), (23041, )]
- [(23038, 'Foo', 'Bar', 0),
- (23039, 'Foo', 'Bar', 0),
- (23054, 'Foo', 'Bar', 0)]
- # Loop Through Rows In A List
- for a in list_a:
- if a == None:
- break
- # Loop Through Rows In B List
- keep_item = False
- for b in list_b:
- # Check If Item From A Database Is Still In B Database
- if a[0] == b[0]:
- keep_item = True
- break
- if not keep_item:
- # Delete Item
- print("Deleting Item " + str(a[0]))
- items_deleted += 1
Add Comment
Please, Sign In to add comment