how to remove the same words in the paragraph

Tim Chase python.list at
Wed Nov 4 16:09:12 CET 2009

>   Can we use inp_paragraph.count(iter_word) to make it simple ?

It would work, but the performance will drop off sharply as the 
length of the paragraph grows, and you'd still have to keep track 
of which words you already printed so you can correctly print the 
first one.  So you might as well not bother with counting.


More information about the Python-list mailing list