[Python] Best way to check new-line-independent-identity of 2 files with python

Discussão em 'Python' iniciado por Stack, Junho 23, 2025.

  1. Stack

    Stack Membro Participativo

    I tried

    filecmp.cmp(file1,file2)


    but it doesn't work since files are identically except for new line characters. Is there an option for that in filecmp or some other convenience function/library or do I have to read both files line by line and compare those?

    Continue reading...

Compartilhe esta Página