"Newbie" questions - "unique" sorting ?
CousinStanley at hotmail.com
Sat Jun 21 11:13:48 CEST 2003
| It didn't seem to work
| so I have obviously done something wrong.
I don't think you did anything wrong,
but I think I did and the problem
didn't show up until I tested
with larger files ...
After re-reading your post again
I did more testing on larger input files
with more words, but still found duplicates
in the end result ...
So, I re-wrote the program
using a dictionary based mechanism
and all dups now seem to be gone
from the output file ...
Usage is ...
python word_list.py file_in.txt file_out.txt
Processing a 40 KB input file
runs in about 8 Seconds
on the 250 MHz Win98 system
that I use ...
Total Words .... 5927
Unique Words .... 1704
More information about the Python-list