Python Forum
comparision of texts in a file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
comparision of texts in a file
#1
I Have 2 files. Suppose file1.txt contains
name=ravi rollno=9987
name=sri rollno=9988
file2.txt contains
name=ravi rollno=9987 mobileno=9876543212
Now i want to compare the above 2 files and generate a 3rdfile(file3.txt),which contains entries not present in file2.
So file3 should contain
name=sri rollno=9988
The file3 should not contain 'name=ravi rollno=9987' as a part of it is present
How do i proceed?
Reply
#2
Please try to write the code, when you get stuck, show what you've done, with any errors (complete and unaltered) and we will be glad to help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Making certain texts stop at a certain time Arikiu 6 2,833 May-20-2021, 06:51 PM
Last Post: Arikiu
  [ library recommendation ] search & highlight target texts in PDF? smallabc 1 2,234 Nov-27-2019, 10:40 AM
Last Post: Larz60+
  phrase loop and character comparision shiro26 6 4,093 Jul-06-2018, 02:03 AM
Last Post: shiro26

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020