Skip to content

Instantly share code, notes, and snippets.

@brlafreniere
Created September 28, 2017 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brlafreniere/651c226f488339a4b476472be4d614bc to your computer and use it in GitHub Desktop.
Save brlafreniere/651c226f488339a4b476472be4d614bc to your computer and use it in GitHub Desktop.
from pprint import pprint
DUPES_FILE = './dupes.txt'
def process_dupes(dupes_file):
groups = [[]]
index = 0
for line in dupes_file:
if line != '\n':
path = line.split(' ')[1]
groups[index].append(path)
else:
index += 1
groups.append([])
pprint(groups)
with open(DUPES_FILE, 'r') as dupes_file:
process_dupes(dupes_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment