File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,8 @@ Option to keep only the header of the first file. (useful for csv files)
18
18
19
19
### semicolonToCommaSeperated.py
20
20
Replaces all commas with a dot '.'
21
- Replaces all semicolons with a comma ','
21
+ Replaces all semicolons with a comma ','
22
+
23
+ ### removeDouble.py
24
+ Takes a file with a list of words
25
+ Removes all instances of words which occur more than once
Original file line number Diff line number Diff line change
1
+ ############################################################
2
+ # Takes a file with a list of words
3
+ # Removes all instances of words which occur more than once
4
+ ############################################################
5
+
6
+ FILENAME = 'allmods.txt'
7
+ OUTPUT = 'difference.txt'
8
+
9
+ adict = []
10
+ diff = []
11
+
12
+
13
+ file = open (FILENAME )
14
+
15
+ for item in file :
16
+ adict .append (item )
17
+
18
+ for item in adict :
19
+ if adict .count (item ) == 1 :
20
+ diff .append (item )
21
+
22
+ outFile = open (OUTPUT ,'w' )
23
+ outFile .writelines (diff )
You can’t perform that action at this time.
0 commit comments