How to pick out the same titles.

Alain Ketterlin alain at universite-de-strasbourg.fr.invalid
Sun Oct 16 12:28:18 EDT 2016


Seymore4Head <Seymore4Head at Hotmail.invalid> writes:

[...]
> I have a  long text file that has movie titles in it and I would like
> to find dupes.
>
> The thing is that sometimes I have one called "The Killing Fields" and
> it also could be listed as "Killing Fields"  Sometimes the title will
> have the date a year off.
>
> What I would like to do it output to another file that show those two
> as a match.

Try the difflib module (read the doc, its default behavior may be
surprising).

-- Alain.



More information about the Python-list mailing list