Created
May 11, 2016 13:44
-
-
Save anonymous/eaac417dba92b7d6e32fb467a5831fcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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