[Tutor] Writing a dictionary to txt file

Cameron Simpson cs at cskk.id.au
Sat Aug 29 18:01:56 EDT 2020


On 29Aug2020 22:33, Alan Gauld <alan.gauld at yahoo.co.uk> wrote:
>On 29/08/2020 18:17, nzbz xx wrote:
>> I have a txt file of records that I have converted into a dictionary. How
>> can I write this dictionary back to the txt file after appending/replacing
>> the values of the dictionary keys?
>
>There are sio many ways to do this that its hard to give advice without
>more details.
>
>Do you have a data specification for the output?

Yes, because the OP got the data from that same text file to start with.

So the OP just needs to reverse the parsing process used to read the 
data.

Without seeing the code it is hard to be more specific.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Tutor mailing list