Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aragaer/79fcec4f1e6f029024e5410bf22f1b25 to your computer and use it in GitHub Desktop.
Save aragaer/79fcec4f1e6f029024e5410bf22f1b25 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: utf-8 -*-
fromWordstat = open('wordstat.txt')
fromCampaign = open('campaign.txt')
result = open('result.txt', 'w')
fromCampaignList = list(fromCampaign)
for value_list in fromWordstat:
for value_list2 in fromCampaignList:
if len(value_list.split()) == len(value_list2.split()):
if set(list(value_list.split())) == set(list(value_list2.split())):
break
else:
result.write(value_list)
fromCampaign.close()
fromWordstat.close()
result.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment