Я хочу проверить два файла 'file1.txt'
и 'file2.txt'
и распечатать линии, которые являются общими. Как мне это сделать? Ниже то, что у меня есть в файлах:Как сравнить два файла по строкам
file1.txt:
An insightful look into the scenario of academic integrity and its implications give us the major motivation
for pursuing the subject. The issue holds utmost significance as the intellectual standards of an individual
pursuing an academia a reestablished around his ability to produce authoritative work. Plagiarism is thus lethal.
Every year a large number of students and scholars submit a huge volume of material to their respective mentors and professors
file2.txt:
An insightful look into the scenario of academic integrity and its implications give us the major motivation
for pursuing the subject. The issue holds utmost significance as the intellectual standards of an individual
pursuing an academia a reestablished around his ability to produce authoritative work. Plagiarism is thus lethal.
Every year a large number of students and scholars submit a huge volume of material to their respective mentors and professors.
Due to the sheer amount of text involved, a manual Result and conclusion follow where we present our observations and learning.
ваш код не работает? –
код, который я опубликовал, работает! но в том, что он просто сравнивает весь файл. Я хочу проверить строку за строкой и распечатать только те строки, которые равны –
Становится все более похожим на XY-проблему. – sawa