Skip to content

Instantly share code, notes, and snippets.

@MatthewJDavis
Created April 9, 2020 02:16
Show Gist options
  • Select an option

  • Save MatthewJDavis/1bc194df266d3e8d9f5582f6dc7a4e4b to your computer and use it in GitHub Desktop.

Select an option

Save MatthewJDavis/1bc194df266d3e8d9f5582f6dc7a4e4b to your computer and use it in GitHub Desktop.
dedupe projects in python
with open('./scheduled_builds.txt', 'r') as f:
lines = f.readlines()
print(lines)
project_list = []
for line in lines:
project_list.append(line)
project_list.sort()
i = 0
end = len(project_list) -1
dedupe_list = []
while i < end:
if project_list[i] != project_list[i + 1]:
dedupe_list.append(project_list[i])
i = i + 1
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment