Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to removewhat is common from one text file using another text file
#1
I have a file that contains the following text.

File1.txt

For all intents and purposes, the reason Mr. Henderson arrived late for work was due to the fact that he stopped at very many traffic lights that were red in colour.
I then have another file with the following text.

File2.txt

[ 4 , 0 , "For all intents and purposes, t" , "T" , 3 , "he reason Mr. " , 3 , "Henderson arrived late for work was " , 0 , "d" , "beca" , 3 , "u" , 2 , "s" , 3 , "e" , 1 , " to the fact that" , 3 , " he stopped at very many traffic lights that were red " , 1 , "in" , 3 , " " , 1 , "colour" , 3 , ". " , 4 , 4 ]

I wish to use File2.txt to remove what is common to file1.txt. Outputting the result to File3.txt.
The contents of File3.txt should when done look like this.

Mr. Henderson arrived late for work because he stopped at many red lights.
Quote
#2
what have you tries so far?
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to extract a matrix from .xml.gz file to a excel file or any other output? enyrb 0 52 Oct-21-2019, 01:01 PM
Last Post: enyrb
  Does python guarantees that file.write() works without file.close() ? kryptomatrix 7 189 Oct-21-2019, 11:28 AM
Last Post: kryptomatrix
  Error when executing pytesseract to get the text from image bvdinesh 3 3,610 Oct-19-2019, 05:01 PM
Last Post: cwco00
  Writing list as a file, then reading that file as a list Zoastria_Balnala 3 108 Oct-17-2019, 07:54 PM
Last Post: Zoastria_Balnala
  Still playing with text files (Jose Portilla on Udemy) Drone4four 2 189 Oct-17-2019, 07:20 PM
Last Post: Drone4four
  How to transfer Text from one Word Document to anouther konsular 11 322 Oct-09-2019, 07:00 PM
Last Post: buran
  Grab and Parse a chunkc of text sumncguy 4 128 Oct-07-2019, 05:17 PM
Last Post: Gribouillis
  How to read a text file into a list or an array musouka 2 204 Oct-07-2019, 01:54 PM
Last Post: musouka
  text box field vishnu 4 150 Oct-04-2019, 06:38 AM
Last Post: vishnu
  Converting a patterned string or text into excel table soup1987 1 135 Oct-03-2019, 01:37 AM
Last Post: Larz60+

Forum Jump:


Users browsing this thread: 1 Guest(s)