Created
January 9, 2015 00:06
-
-
Save terrycojones/741d0d86c24ac9920095 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
seen = {} | |
for lineNumber, line in enumerate(sys.stdin): | |
if lineNumber: | |
fields = line.split('|') | |
key = '|'.join(fields[:2] + fields[3:]) | |
if key in seen: | |
if seen[key]: | |
print seen[key], | |
seen[key] = None | |
print line, | |
else: | |
seen[key] = line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment