[Tutor] write dictionary to file

Peter Otten __peter__ at web.de
Mon Jun 23 11:44:30 CEST 2014


Ian, take a step back; the first step to solve a problem is to state it 
clearly. You want to write a dict to a file.

(1) What would the dictionary look like? Give concrete example, e. g.

{"foo": 42, "bar": 'that\'s not "funny"'}

(2) What should the resulting file look like when you open it in a text 
editer? Example:

foo,bar
42,"that's not ""funny"""

Only then you should proceed to write code.



More information about the Tutor mailing list