Find Jobs
Hire Freelancers

2 Similar Python Scripts

$30-100 USD

Completed
Posted over 12 years ago

$30-100 USD

Paid on delivery
First script compares 2 text files, [login to view URL] and [login to view URL] . File1 contains a list of phrases (1 phrase per line, phrase can be any number of words). File2 contains a list of words or phrases (1 phrase per line). The .py Python script should compare the phrases in [login to view URL] to phrases in file1.txt. The script must REMOVE any lines from [login to view URL] which contain any exact word/phrase in file2.txt. E.g. [login to view URL], 'text' stands for random text text text word1 text word2 text text text word3 word4 text text text word5 text [login to view URL] dog text text cat fish text text bread word4 word2 egg very excellent word5 The output file would be text text word1 text text text word3 text word5 text Since word2, word4 appear in file2.txt. Note that the match must be exact for it to be removed from the [login to view URL] . For example, although word5 appears in [login to view URL], it is in the form 'very excellent word5' , and since 'very excellent word5' does not appear in [login to view URL], it is not removed from file1.txt. If no words/phrases are in [login to view URL] which are in [login to view URL], then the output is the same as [login to view URL] . ------ Second script will compare [login to view URL] and [login to view URL], but this time, the output file would output lines from [login to view URL] which contain exact word/phrases from [login to view URL], rather than deleting them. So the output from the above example is: text word2 word4 text text Basically the inverse output of the first script. Instead of deleting those words from [login to view URL] and outputting that, instead it outputs the words that it would have deleted in the first script. ------ I hope I have explained this well enough, it's not as complicated as it sounds.
Project ID: 2705737

About the project

2 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$10 USD in 14 days
5.0 (1 review)
0.0
0.0
2 freelancers are bidding on average $26 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (23 reviews)
4.6
4.6

About the client

Flag of UNITED KINGDOM
Wales, United Kingdom
5.0
14
Payment method verified
Member since Aug 26, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.