Guest User

Untitled

a guest
May 20th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. [(23026, ), (23038, ), (23039, ), (23040, ), (23041, )]
  2.  
  3. [(23038, 'Foo', 'Bar', 0),
  4. (23039, 'Foo', 'Bar', 0),
  5. (23054, 'Foo', 'Bar', 0)]
  6.  
  7. # Loop Through Rows In A List
  8. for a in list_a:
  9. if a == None:
  10. break
  11.  
  12. # Loop Through Rows In B List
  13. keep_item = False
  14. for b in list_b:
  15. # Check If Item From A Database Is Still In B Database
  16. if a[0] == b[0]:
  17. keep_item = True
  18. break
  19.  
  20. if not keep_item:
  21. # Delete Item
  22. print("Deleting Item " + str(a[0]))
  23. items_deleted += 1
Add Comment
Please, Sign In to add comment