[[ ]{' ' ' ' }because the end result of all this parsing and converting is list of normal python objects instead of stringswe can now apply list and dictionary operations to them in our script storing native python objectspickle using eval to convert from strings to objectsas demonstrated in the preceding codeis powerful tool in factsometimes it' too powerful eval will happily run any python expression--even one that might delete all the files on your computergiven the necessary permissionsif you really want to store native python objectsbut you can' trust the source of the data in the filepython' standard library pickle module is ideal the pickle module is more advanced tool that allows us to store almost any python object in file directlywith no toor from-string conversion requirement on our part it' like super-general data formatting and parsing utility to store dictionary in filefor instancewe pickle it directlyd {' ' ' ' open('datafile pkl''wb'import pickle pickle dump(dff close(pickle any object to file thento get the dictionary back laterwe simply use pickle again to re-create itf open('datafile pkl''rb' pickle load(fe {' ' ' ' load any object from file we get back an equivalent dictionary objectwith no manual splitting or converting required the pickle module performs what is known as object serialization--converting objects to and from strings of bytes--but requires very little work on our part in factpickle internally translates our dictionary to string formthough it' not much to look at (and may vary if we pickle in other data protocol modes)open('datafile pkl''rb'read(format is prone to changeb'\ \ } \ ( \ \ \ \ bq\ \ \ \ \ \ aq\ \ because pickle can reconstruct the object from this formatwe don' have to deal with it ourselves for more on the pickle modulesee the python standard library manualor import pickle and pass it to help interactively while you're exploringalso take look at the shelve module shelve is tool that uses pickle to store python objects in an access-by-key filesystemwhich is beyond our scope here (though you will get to see an example of shelve in action in and other pickle examples in and tuplesfilesand everything else