Created
April 9, 2020 02:16
-
-
Save MatthewJDavis/1bc194df266d3e8d9f5582f6dc7a4e4b to your computer and use it in GitHub Desktop.
dedupe projects in python
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
| 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