Skip to content

Instantly share code, notes, and snippets.

Created May 11, 2016 13:44
Show Gist options
  • Save anonymous/eaac417dba92b7d6e32fb467a5831fcc to your computer and use it in GitHub Desktop.
Save anonymous/eaac417dba92b7d6e32fb467a5831fcc to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
fromWordstat = open('wordstat.txt', 'r')
fromCampaign = open('campaign.txt', 'r')
result = open('result.txt', 'w')
fromWordstatList = list(fromWordstat)
fromCampaignList = list(fromCampaign)
found = []
for i, value_list in enumerate(fromWordstatList):
for b, value_list2 in enumerate(fromCampaignList):
if len(value_list.split()) == len(value_list2.split()):
if set(value_list.split()) == set(value_list2.split()):
pass
else:
found.append(value_list)
break
else:
pass
for wr in found:
result.write(wr)
fromCampaign.close()
fromWordstat.close()
result.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment