Replace content in CSV file | SoloLearn: Learn to code for FREE!


Replace content in CSV file

How do i replace a sting in a CSV file with another, without using CSV module or other built in functions e.g I have a runner and want to update their running time with their new time

3/18/2019 4:12:12 PM

farhan bhatti

4 Answers

New Answer


Don't wanna use CSV module or in-built function? How about using regEx?


You can obviously do that even without using regEx by iterating through entire string and then applying some conditions to filter out the characters you want and may be replace those by another characters. But it'll be lengthy and time consuming as the string becomes longer and search pattern becomes complex but again, yep you can do that.


that would mean ill have to import the module😅, im tring to do it without using other modules or the CSV builtin functions


ok, thanks ill try that