I'm getting an annoying problem...I have been able to append data at the end of a file without any problem. But now I'm trying to open a text file, reading some of its data and trying to modify or update some of its data...but I'm finding it really hard to do I haven't been able to do it at all after couple of trials
For example, let say there is the following contents in the text file:
Now I want to change the Age and put it to 31. How do I do that?? Please help!! What code to use??
I want to keep the original file...that is I have to update the original one itself.
I'm getting confused with the Mode as well..."r", "w", "a", "r+", "w+", "a+". Which one should I use?? I was trying "w+" and "w"...but doesn't work
Thanking you in advance.