vendredi 19 mai 2017

Comparison of 2 text files in Python for a particular pattern

I want to compare a text file having some filenames with another text file that has the list of files but with extentions:-

For example:- TextFile 1 has files like "filename1","filename2" etc.

The file with which I want to compare may have the list of same files but with some extentions:-

eg:-"filename1-abc.ext","filename2-xyz.ext" etc.

Now I want to write a code in python that will compare the 1st text file with the second one and tell me whether they exist in the second textfile by ignoring the extentions.

Kindly help.

Aucun commentaire:

Enregistrer un commentaire