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
1 Antwort
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/JUMP_LINK__&&__Python__&&__JUMP_LINK/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