check.py 540 B

12345678910111213141516171819202122232425
  1. """Check difference between lists"""
  2. inside = []
  3. not_inside = []
  4. not_outside = []
  5. with open('inside.txt', 'r') as file:
  6. for line in file:
  7. inside.append(line.replace('\n', ''))
  8. with open('outside.txt', 'r') as file:
  9. for line in file:
  10. line = line.replace('\n', '')
  11. if line in inside:
  12. not_outside.append(line)
  13. else:
  14. not_inside.append(line)
  15. print("Not inside:")
  16. for player in not_inside:
  17. print(player)
  18. print("\nNot outside:")
  19. for player in not_outside:
  20. print(player)