how to do string pattern matching and replacement using files | Sololearn: Learn to code for FREE!

0

how to do string pattern matching and replacement using files

write a function takes pattern string replace file(),that takes pattern string,replacement string and two files names as argument. the function should read the first file and write the content into second file . if the pattern string appear anywhere in first file it should be replaced by replacement string in second file

9/17/2018 9:25:55 AM

anubhav mandarwal

1 Answer

New Answer

0

Have you tried to write some code ? If so can you share it so we can work on what you cannot resolve by yourself ? If you don't know where to start, check the course about opening, reading and writing files in Sololearn https://www.sololearn.com/learn/Python/2445/ https://www.sololearn.com/learn/Python/2446/ https://www.sololearn.com/learn/Python/2447/ (or elsewhere) If you have problems understanding something I will be glad to help