I am writing a simple program that offers the user an account. That includes that the user can change his or her password over and over. And if he or she includes info as their telephone number, there must be options that enable them to change their own data.
The program will open .txt files and read the info.
For example, this is a small part of the info that the .txt includes:
123$333$Harold$321$Far far away3 124$444$George$654$Far far away4 #I logged in with this account 125$555$Louis$987$Far far away5
Now suppose that George (the one who logged in) wants to change his adress. I mean it is easy to modify the info once it is on the list, split by the "$". This is how the modified list will look like:
[124, 444, 'George', 654, '22 Acacia Avenue']
But the question is how can I modify the .txt so that the contents will look like this?
123$333$Harold$321$Far far away3 124$444$George$654$22 Acacia Avenue 125$555$Louis$987$Far far away5
How can I achieve this?
shelvemodule that jordanm was referring to