0

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 https://code.sololearn.com/cvkZ4jY92bCX/?ref=app

18th Mar 2019, 4:12 PM
farhan bhatti
farhan bhatti - avatar
4 Respuestas
+ 6
Don't wanna use CSV module or in-built function? How about using regEx?
18th Mar 2019, 5:02 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 5
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.
18th Mar 2019, 11:34 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 1
that would mean ill have to import the module😅, im tring to do it without using other modules or the CSV builtin functions
18th Mar 2019, 5:43 PM
farhan bhatti
farhan bhatti - avatar
0
ok, thanks ill try that
19th Mar 2019, 11:46 AM
farhan bhatti
farhan bhatti - avatar